mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
Pull core block updates from Jens Axboe:
- the big change is the cleanup from Mike Christie, cleaning up our
uses of command types and modified flags. This is what will throw
some merge conflicts
- regression fix for the above for btrfs, from Vincent
- following up to the above, better packing of struct request from
Christoph
- a 2038 fix for blktrace from Arnd
- a few trivial/spelling fixes from Bart Van Assche
- a front merge check fix from Damien, which could cause issues on
SMR drives
- Atari partition fix from Gabriel
- convert cfq to highres timers, since jiffies isn't granular enough
for some devices these days. From Jan and Jeff
- CFQ priority boost fix idle classes, from me
- cleanup series from Ming, improving our bio/bvec iteration
- a direct issue fix for blk-mq from Omar
- fix for plug merging not involving the IO scheduler, like we do for
other types of merges. From Tahsin
- expose DAX type internally and through sysfs. From Toshi and Yigal
* 'for-4.8/core' of git://git.kernel.dk/linux-block: (76 commits)
block: Fix front merge check
block: do not merge requests without consulting with io scheduler
block: Fix spelling in a source code comment
block: expose QUEUE_FLAG_DAX in sysfs
block: add QUEUE_FLAG_DAX for devices to advertise their DAX support
Btrfs: fix comparison in __btrfs_map_block()
block: atari: Return early for unsupported sector size
Doc: block: Fix a typo in queue-sysfs.txt
cfq-iosched: Charge at least 1 jiffie instead of 1 ns
cfq-iosched: Fix regression in bonnie++ rewrite performance
cfq-iosched: Convert slice_resid from u64 to s64
block: Convert fifo_time from ulong to u64
blktrace: avoid using timespec
block/blk-cgroup.c: Declare local symbols static
block/bio-integrity.c: Add #include "blk.h"
block/partition-generic.c: Remove a set-but-not-used variable
block: bio: kill BIO_MAX_SIZE
cfq-iosched: temporarily boost queue priority for idle classes
block: drbd: avoid to use BIO_MAX_SIZE
block: bio: remove BIO_MAX_SECTORS
...
This commit is contained in:
commit
d05d7f4079
199 changed files with 1918 additions and 1523 deletions
|
|
@ -285,7 +285,7 @@ static void gfs2_metapath_ra(struct gfs2_glock *gl,
|
|||
if (trylock_buffer(rabh)) {
|
||||
if (!buffer_uptodate(rabh)) {
|
||||
rabh->b_end_io = end_buffer_read_sync;
|
||||
submit_bh(READA | REQ_META, rabh);
|
||||
submit_bh(REQ_OP_READ, READA | REQ_META, rabh);
|
||||
continue;
|
||||
}
|
||||
unlock_buffer(rabh);
|
||||
|
|
@ -974,7 +974,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping, loff_t from)
|
|||
|
||||
if (!buffer_uptodate(bh)) {
|
||||
err = -EIO;
|
||||
ll_rw_block(READ, 1, &bh);
|
||||
ll_rw_block(REQ_OP_READ, 0, 1, &bh);
|
||||
wait_on_buffer(bh);
|
||||
/* Uhhuh. Read error. Complain and punt. */
|
||||
if (!buffer_uptodate(bh))
|
||||
|
|
|
|||
|
|
@ -1513,7 +1513,7 @@ static void gfs2_dir_readahead(struct inode *inode, unsigned hsize, u32 index,
|
|||
continue;
|
||||
}
|
||||
bh->b_end_io = end_buffer_read_sync;
|
||||
submit_bh(READA | REQ_META, bh);
|
||||
submit_bh(REQ_OP_READ, READA | REQ_META, bh);
|
||||
continue;
|
||||
}
|
||||
brelse(bh);
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
|
|||
struct gfs2_log_header *lh;
|
||||
unsigned int tail;
|
||||
u32 hash;
|
||||
int rw = WRITE_FLUSH_FUA | REQ_META;
|
||||
int op_flags = WRITE_FLUSH_FUA | REQ_META;
|
||||
struct page *page = mempool_alloc(gfs2_page_pool, GFP_NOIO);
|
||||
enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state);
|
||||
lh = page_address(page);
|
||||
|
|
@ -682,12 +682,12 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
|
|||
if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) {
|
||||
gfs2_ordered_wait(sdp);
|
||||
log_flush_wait(sdp);
|
||||
rw = WRITE_SYNC | REQ_META | REQ_PRIO;
|
||||
op_flags = WRITE_SYNC | REQ_META | REQ_PRIO;
|
||||
}
|
||||
|
||||
sdp->sd_log_idle = (tail == sdp->sd_log_flush_head);
|
||||
gfs2_log_write_page(sdp, page);
|
||||
gfs2_log_flush_bio(sdp, rw);
|
||||
gfs2_log_flush_bio(sdp, REQ_OP_WRITE, op_flags);
|
||||
log_flush_wait(sdp);
|
||||
|
||||
if (sdp->sd_log_tail != tail)
|
||||
|
|
@ -738,7 +738,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl,
|
|||
|
||||
gfs2_ordered_write(sdp);
|
||||
lops_before_commit(sdp, tr);
|
||||
gfs2_log_flush_bio(sdp, WRITE);
|
||||
gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
|
||||
|
||||
if (sdp->sd_log_head != sdp->sd_log_flush_head) {
|
||||
log_flush_wait(sdp);
|
||||
|
|
|
|||
|
|
@ -230,17 +230,19 @@ static void gfs2_end_log_write(struct bio *bio)
|
|||
/**
|
||||
* gfs2_log_flush_bio - Submit any pending log bio
|
||||
* @sdp: The superblock
|
||||
* @rw: The rw flags
|
||||
* @op: REQ_OP
|
||||
* @op_flags: rq_flag_bits
|
||||
*
|
||||
* Submit any pending part-built or full bio to the block device. If
|
||||
* there is no pending bio, then this is a no-op.
|
||||
*/
|
||||
|
||||
void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw)
|
||||
void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int op, int op_flags)
|
||||
{
|
||||
if (sdp->sd_log_bio) {
|
||||
atomic_inc(&sdp->sd_log_in_flight);
|
||||
submit_bio(rw, sdp->sd_log_bio);
|
||||
bio_set_op_attrs(sdp->sd_log_bio, op, op_flags);
|
||||
submit_bio(sdp->sd_log_bio);
|
||||
sdp->sd_log_bio = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -299,7 +301,7 @@ static struct bio *gfs2_log_get_bio(struct gfs2_sbd *sdp, u64 blkno)
|
|||
nblk >>= sdp->sd_fsb2bb_shift;
|
||||
if (blkno == nblk)
|
||||
return bio;
|
||||
gfs2_log_flush_bio(sdp, WRITE);
|
||||
gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
|
||||
}
|
||||
|
||||
return gfs2_log_alloc_bio(sdp, blkno);
|
||||
|
|
@ -328,7 +330,7 @@ static void gfs2_log_write(struct gfs2_sbd *sdp, struct page *page,
|
|||
bio = gfs2_log_get_bio(sdp, blkno);
|
||||
ret = bio_add_page(bio, page, size, offset);
|
||||
if (ret == 0) {
|
||||
gfs2_log_flush_bio(sdp, WRITE);
|
||||
gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
|
||||
bio = gfs2_log_alloc_bio(sdp, blkno);
|
||||
ret = bio_add_page(bio, page, size, offset);
|
||||
WARN_ON(ret == 0);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ extern const struct gfs2_log_operations gfs2_databuf_lops;
|
|||
|
||||
extern const struct gfs2_log_operations *gfs2_log_ops[];
|
||||
extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page);
|
||||
extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw);
|
||||
extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int op, int op_flags);
|
||||
extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
|
||||
|
||||
static inline unsigned int buf_limit(struct gfs2_sbd *sdp)
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb
|
|||
{
|
||||
struct buffer_head *bh, *head;
|
||||
int nr_underway = 0;
|
||||
int write_op = REQ_META | REQ_PRIO |
|
||||
(wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE);
|
||||
int write_flags = REQ_META | REQ_PRIO |
|
||||
(wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : 0);
|
||||
|
||||
BUG_ON(!PageLocked(page));
|
||||
BUG_ON(!page_has_buffers(page));
|
||||
|
|
@ -79,7 +79,7 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb
|
|||
do {
|
||||
struct buffer_head *next = bh->b_this_page;
|
||||
if (buffer_async_write(bh)) {
|
||||
submit_bh(write_op, bh);
|
||||
submit_bh(REQ_OP_WRITE, write_flags, bh);
|
||||
nr_underway++;
|
||||
}
|
||||
bh = next;
|
||||
|
|
@ -213,7 +213,8 @@ static void gfs2_meta_read_endio(struct bio *bio)
|
|||
* Submit several consecutive buffer head I/O requests as a single bio I/O
|
||||
* request. (See submit_bh_wbc.)
|
||||
*/
|
||||
static void gfs2_submit_bhs(int rw, struct buffer_head *bhs[], int num)
|
||||
static void gfs2_submit_bhs(int op, int op_flags, struct buffer_head *bhs[],
|
||||
int num)
|
||||
{
|
||||
struct buffer_head *bh = bhs[0];
|
||||
struct bio *bio;
|
||||
|
|
@ -230,7 +231,8 @@ static void gfs2_submit_bhs(int rw, struct buffer_head *bhs[], int num)
|
|||
bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh));
|
||||
}
|
||||
bio->bi_end_io = gfs2_meta_read_endio;
|
||||
submit_bio(rw, bio);
|
||||
bio_set_op_attrs(bio, op, op_flags);
|
||||
submit_bio(bio);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -280,7 +282,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
|
|||
}
|
||||
}
|
||||
|
||||
gfs2_submit_bhs(READ_SYNC | REQ_META | REQ_PRIO, bhs, num);
|
||||
gfs2_submit_bhs(REQ_OP_READ, READ_SYNC | REQ_META | REQ_PRIO, bhs, num);
|
||||
if (!(flags & DIO_WAIT))
|
||||
return 0;
|
||||
|
||||
|
|
@ -448,7 +450,7 @@ struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen)
|
|||
if (buffer_uptodate(first_bh))
|
||||
goto out;
|
||||
if (!buffer_locked(first_bh))
|
||||
ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh);
|
||||
ll_rw_block(REQ_OP_READ, READ_SYNC | REQ_META, 1, &first_bh);
|
||||
|
||||
dblock++;
|
||||
extlen--;
|
||||
|
|
@ -457,7 +459,7 @@ struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen)
|
|||
bh = gfs2_getbuf(gl, dblock, CREATE);
|
||||
|
||||
if (!buffer_uptodate(bh) && !buffer_locked(bh))
|
||||
ll_rw_block(READA | REQ_META, 1, &bh);
|
||||
ll_rw_block(REQ_OP_READ, READA | REQ_META, 1, &bh);
|
||||
brelse(bh);
|
||||
dblock++;
|
||||
extlen--;
|
||||
|
|
|
|||
|
|
@ -246,7 +246,8 @@ static int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector, int silent)
|
|||
|
||||
bio->bi_end_io = end_bio_io_page;
|
||||
bio->bi_private = page;
|
||||
submit_bio(READ_SYNC | REQ_META, bio);
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, READ_SYNC | REQ_META);
|
||||
submit_bio(bio);
|
||||
wait_on_page_locked(page);
|
||||
bio_put(bio);
|
||||
if (!PageUptodate(page)) {
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
|
|||
if (PageUptodate(page))
|
||||
set_buffer_uptodate(bh);
|
||||
if (!buffer_uptodate(bh)) {
|
||||
ll_rw_block(READ | REQ_META, 1, &bh);
|
||||
ll_rw_block(REQ_OP_READ, REQ_META, 1, &bh);
|
||||
wait_on_buffer(bh);
|
||||
if (!buffer_uptodate(bh))
|
||||
goto unlock_out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue