diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 18:03:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 18:03:07 -0400 |
commit | d05d7f40791ccbb6e543cc5dd6a6aa08fc71d635 (patch) | |
tree | dc0039fe490a41a70de10d58fe8e6136db46463a /fs/gfs2 | |
parent | 75a442efb1ca613f8d1cc71a32c2c9b0aefae4a5 (diff) | |
parent | 17007f3994cdb4643355c73f54f0adad006cf59e (diff) |
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
...
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/bmap.c | 4 | ||||
-rw-r--r-- | fs/gfs2/dir.c | 2 | ||||
-rw-r--r-- | fs/gfs2/log.c | 8 | ||||
-rw-r--r-- | fs/gfs2/lops.c | 12 | ||||
-rw-r--r-- | fs/gfs2/lops.h | 2 | ||||
-rw-r--r-- | fs/gfs2/meta_io.c | 18 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 3 | ||||
-rw-r--r-- | fs/gfs2/quota.c | 2 |
8 files changed, 28 insertions, 23 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 24ce1cdd434a..fd6389cf0f14 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -285,7 +285,7 @@ static void gfs2_metapath_ra(struct gfs2_glock *gl, | |||
285 | if (trylock_buffer(rabh)) { | 285 | if (trylock_buffer(rabh)) { |
286 | if (!buffer_uptodate(rabh)) { | 286 | if (!buffer_uptodate(rabh)) { |
287 | rabh->b_end_io = end_buffer_read_sync; | 287 | rabh->b_end_io = end_buffer_read_sync; |
288 | submit_bh(READA | REQ_META, rabh); | 288 | submit_bh(REQ_OP_READ, READA | REQ_META, rabh); |
289 | continue; | 289 | continue; |
290 | } | 290 | } |
291 | unlock_buffer(rabh); | 291 | unlock_buffer(rabh); |
@@ -974,7 +974,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping, loff_t from) | |||
974 | 974 | ||
975 | if (!buffer_uptodate(bh)) { | 975 | if (!buffer_uptodate(bh)) { |
976 | err = -EIO; | 976 | err = -EIO; |
977 | ll_rw_block(READ, 1, &bh); | 977 | ll_rw_block(REQ_OP_READ, 0, 1, &bh); |
978 | wait_on_buffer(bh); | 978 | wait_on_buffer(bh); |
979 | /* Uhhuh. Read error. Complain and punt. */ | 979 | /* Uhhuh. Read error. Complain and punt. */ |
980 | if (!buffer_uptodate(bh)) | 980 | if (!buffer_uptodate(bh)) |
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index e30cc9fb2bef..4d68530d6636 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -1513,7 +1513,7 @@ static void gfs2_dir_readahead(struct inode *inode, unsigned hsize, u32 index, | |||
1513 | continue; | 1513 | continue; |
1514 | } | 1514 | } |
1515 | bh->b_end_io = end_buffer_read_sync; | 1515 | bh->b_end_io = end_buffer_read_sync; |
1516 | submit_bh(READA | REQ_META, bh); | 1516 | submit_bh(REQ_OP_READ, READA | REQ_META, bh); |
1517 | continue; | 1517 | continue; |
1518 | } | 1518 | } |
1519 | brelse(bh); | 1519 | brelse(bh); |
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 0ff028c15199..e58ccef09c91 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -657,7 +657,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags) | |||
657 | struct gfs2_log_header *lh; | 657 | struct gfs2_log_header *lh; |
658 | unsigned int tail; | 658 | unsigned int tail; |
659 | u32 hash; | 659 | u32 hash; |
660 | int rw = WRITE_FLUSH_FUA | REQ_META; | 660 | int op_flags = WRITE_FLUSH_FUA | REQ_META; |
661 | struct page *page = mempool_alloc(gfs2_page_pool, GFP_NOIO); | 661 | struct page *page = mempool_alloc(gfs2_page_pool, GFP_NOIO); |
662 | enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state); | 662 | enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state); |
663 | lh = page_address(page); | 663 | lh = page_address(page); |
@@ -682,12 +682,12 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags) | |||
682 | if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) { | 682 | if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) { |
683 | gfs2_ordered_wait(sdp); | 683 | gfs2_ordered_wait(sdp); |
684 | log_flush_wait(sdp); | 684 | log_flush_wait(sdp); |
685 | rw = WRITE_SYNC | REQ_META | REQ_PRIO; | 685 | op_flags = WRITE_SYNC | REQ_META | REQ_PRIO; |
686 | } | 686 | } |
687 | 687 | ||
688 | sdp->sd_log_idle = (tail == sdp->sd_log_flush_head); | 688 | sdp->sd_log_idle = (tail == sdp->sd_log_flush_head); |
689 | gfs2_log_write_page(sdp, page); | 689 | gfs2_log_write_page(sdp, page); |
690 | gfs2_log_flush_bio(sdp, rw); | 690 | gfs2_log_flush_bio(sdp, REQ_OP_WRITE, op_flags); |
691 | log_flush_wait(sdp); | 691 | log_flush_wait(sdp); |
692 | 692 | ||
693 | if (sdp->sd_log_tail != tail) | 693 | if (sdp->sd_log_tail != tail) |
@@ -738,7 +738,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, | |||
738 | 738 | ||
739 | gfs2_ordered_write(sdp); | 739 | gfs2_ordered_write(sdp); |
740 | lops_before_commit(sdp, tr); | 740 | lops_before_commit(sdp, tr); |
741 | gfs2_log_flush_bio(sdp, WRITE); | 741 | gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0); |
742 | 742 | ||
743 | if (sdp->sd_log_head != sdp->sd_log_flush_head) { | 743 | if (sdp->sd_log_head != sdp->sd_log_flush_head) { |
744 | log_flush_wait(sdp); | 744 | log_flush_wait(sdp); |
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 8e3ba20d5e9d..49d5a1b61b06 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -230,17 +230,19 @@ static void gfs2_end_log_write(struct bio *bio) | |||
230 | /** | 230 | /** |
231 | * gfs2_log_flush_bio - Submit any pending log bio | 231 | * gfs2_log_flush_bio - Submit any pending log bio |
232 | * @sdp: The superblock | 232 | * @sdp: The superblock |
233 | * @rw: The rw flags | 233 | * @op: REQ_OP |
234 | * @op_flags: rq_flag_bits | ||
234 | * | 235 | * |
235 | * Submit any pending part-built or full bio to the block device. If | 236 | * Submit any pending part-built or full bio to the block device. If |
236 | * there is no pending bio, then this is a no-op. | 237 | * there is no pending bio, then this is a no-op. |
237 | */ | 238 | */ |
238 | 239 | ||
239 | void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw) | 240 | void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int op, int op_flags) |
240 | { | 241 | { |
241 | if (sdp->sd_log_bio) { | 242 | if (sdp->sd_log_bio) { |
242 | atomic_inc(&sdp->sd_log_in_flight); | 243 | atomic_inc(&sdp->sd_log_in_flight); |
243 | submit_bio(rw, sdp->sd_log_bio); | 244 | bio_set_op_attrs(sdp->sd_log_bio, op, op_flags); |
245 | submit_bio(sdp->sd_log_bio); | ||
244 | sdp->sd_log_bio = NULL; | 246 | sdp->sd_log_bio = NULL; |
245 | } | 247 | } |
246 | } | 248 | } |
@@ -299,7 +301,7 @@ static struct bio *gfs2_log_get_bio(struct gfs2_sbd *sdp, u64 blkno) | |||
299 | nblk >>= sdp->sd_fsb2bb_shift; | 301 | nblk >>= sdp->sd_fsb2bb_shift; |
300 | if (blkno == nblk) | 302 | if (blkno == nblk) |
301 | return bio; | 303 | return bio; |
302 | gfs2_log_flush_bio(sdp, WRITE); | 304 | gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0); |
303 | } | 305 | } |
304 | 306 | ||
305 | return gfs2_log_alloc_bio(sdp, blkno); | 307 | return gfs2_log_alloc_bio(sdp, blkno); |
@@ -328,7 +330,7 @@ static void gfs2_log_write(struct gfs2_sbd *sdp, struct page *page, | |||
328 | bio = gfs2_log_get_bio(sdp, blkno); | 330 | bio = gfs2_log_get_bio(sdp, blkno); |
329 | ret = bio_add_page(bio, page, size, offset); | 331 | ret = bio_add_page(bio, page, size, offset); |
330 | if (ret == 0) { | 332 | if (ret == 0) { |
331 | gfs2_log_flush_bio(sdp, WRITE); | 333 | gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0); |
332 | bio = gfs2_log_alloc_bio(sdp, blkno); | 334 | bio = gfs2_log_alloc_bio(sdp, blkno); |
333 | ret = bio_add_page(bio, page, size, offset); | 335 | ret = bio_add_page(bio, page, size, offset); |
334 | WARN_ON(ret == 0); | 336 | WARN_ON(ret == 0); |
diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h index a65a7ba32ffd..e529f536c117 100644 --- a/fs/gfs2/lops.h +++ b/fs/gfs2/lops.h | |||
@@ -27,7 +27,7 @@ extern const struct gfs2_log_operations gfs2_databuf_lops; | |||
27 | 27 | ||
28 | extern const struct gfs2_log_operations *gfs2_log_ops[]; | 28 | extern const struct gfs2_log_operations *gfs2_log_ops[]; |
29 | extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page); | 29 | extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page); |
30 | extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw); | 30 | extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int op, int op_flags); |
31 | extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); | 31 | extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); |
32 | 32 | ||
33 | static inline unsigned int buf_limit(struct gfs2_sbd *sdp) | 33 | static inline unsigned int buf_limit(struct gfs2_sbd *sdp) |
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 8eaadabbc771..052c1132e5b6 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -37,8 +37,8 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb | |||
37 | { | 37 | { |
38 | struct buffer_head *bh, *head; | 38 | struct buffer_head *bh, *head; |
39 | int nr_underway = 0; | 39 | int nr_underway = 0; |
40 | int write_op = REQ_META | REQ_PRIO | | 40 | int write_flags = REQ_META | REQ_PRIO | |
41 | (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE); | 41 | (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : 0); |
42 | 42 | ||
43 | BUG_ON(!PageLocked(page)); | 43 | BUG_ON(!PageLocked(page)); |
44 | BUG_ON(!page_has_buffers(page)); | 44 | BUG_ON(!page_has_buffers(page)); |
@@ -79,7 +79,7 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb | |||
79 | do { | 79 | do { |
80 | struct buffer_head *next = bh->b_this_page; | 80 | struct buffer_head *next = bh->b_this_page; |
81 | if (buffer_async_write(bh)) { | 81 | if (buffer_async_write(bh)) { |
82 | submit_bh(write_op, bh); | 82 | submit_bh(REQ_OP_WRITE, write_flags, bh); |
83 | nr_underway++; | 83 | nr_underway++; |
84 | } | 84 | } |
85 | bh = next; | 85 | bh = next; |
@@ -213,7 +213,8 @@ static void gfs2_meta_read_endio(struct bio *bio) | |||
213 | * Submit several consecutive buffer head I/O requests as a single bio I/O | 213 | * Submit several consecutive buffer head I/O requests as a single bio I/O |
214 | * request. (See submit_bh_wbc.) | 214 | * request. (See submit_bh_wbc.) |
215 | */ | 215 | */ |
216 | static void gfs2_submit_bhs(int rw, struct buffer_head *bhs[], int num) | 216 | static void gfs2_submit_bhs(int op, int op_flags, struct buffer_head *bhs[], |
217 | int num) | ||
217 | { | 218 | { |
218 | struct buffer_head *bh = bhs[0]; | 219 | struct buffer_head *bh = bhs[0]; |
219 | struct bio *bio; | 220 | struct bio *bio; |
@@ -230,7 +231,8 @@ static void gfs2_submit_bhs(int rw, struct buffer_head *bhs[], int num) | |||
230 | bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh)); | 231 | bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh)); |
231 | } | 232 | } |
232 | bio->bi_end_io = gfs2_meta_read_endio; | 233 | bio->bi_end_io = gfs2_meta_read_endio; |
233 | submit_bio(rw, bio); | 234 | bio_set_op_attrs(bio, op, op_flags); |
235 | submit_bio(bio); | ||
234 | } | 236 | } |
235 | 237 | ||
236 | /** | 238 | /** |
@@ -280,7 +282,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, | |||
280 | } | 282 | } |
281 | } | 283 | } |
282 | 284 | ||
283 | gfs2_submit_bhs(READ_SYNC | REQ_META | REQ_PRIO, bhs, num); | 285 | gfs2_submit_bhs(REQ_OP_READ, READ_SYNC | REQ_META | REQ_PRIO, bhs, num); |
284 | if (!(flags & DIO_WAIT)) | 286 | if (!(flags & DIO_WAIT)) |
285 | return 0; | 287 | return 0; |
286 | 288 | ||
@@ -448,7 +450,7 @@ struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen) | |||
448 | if (buffer_uptodate(first_bh)) | 450 | if (buffer_uptodate(first_bh)) |
449 | goto out; | 451 | goto out; |
450 | if (!buffer_locked(first_bh)) | 452 | if (!buffer_locked(first_bh)) |
451 | ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh); | 453 | ll_rw_block(REQ_OP_READ, READ_SYNC | REQ_META, 1, &first_bh); |
452 | 454 | ||
453 | dblock++; | 455 | dblock++; |
454 | extlen--; | 456 | extlen--; |
@@ -457,7 +459,7 @@ struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen) | |||
457 | bh = gfs2_getbuf(gl, dblock, CREATE); | 459 | bh = gfs2_getbuf(gl, dblock, CREATE); |
458 | 460 | ||
459 | if (!buffer_uptodate(bh) && !buffer_locked(bh)) | 461 | if (!buffer_uptodate(bh) && !buffer_locked(bh)) |
460 | ll_rw_block(READA | REQ_META, 1, &bh); | 462 | ll_rw_block(REQ_OP_READ, READA | REQ_META, 1, &bh); |
461 | brelse(bh); | 463 | brelse(bh); |
462 | dblock++; | 464 | dblock++; |
463 | extlen--; | 465 | extlen--; |
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index b8f6fc9513ef..ef1e1822977f 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -246,7 +246,8 @@ static int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector, int silent) | |||
246 | 246 | ||
247 | bio->bi_end_io = end_bio_io_page; | 247 | bio->bi_end_io = end_bio_io_page; |
248 | bio->bi_private = page; | 248 | bio->bi_private = page; |
249 | submit_bio(READ_SYNC | REQ_META, bio); | 249 | bio_set_op_attrs(bio, REQ_OP_READ, READ_SYNC | REQ_META); |
250 | submit_bio(bio); | ||
250 | wait_on_page_locked(page); | 251 | wait_on_page_locked(page); |
251 | bio_put(bio); | 252 | bio_put(bio); |
252 | if (!PageUptodate(page)) { | 253 | if (!PageUptodate(page)) { |
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 6c657b202501..77930ca25303 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -730,7 +730,7 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, | |||
730 | if (PageUptodate(page)) | 730 | if (PageUptodate(page)) |
731 | set_buffer_uptodate(bh); | 731 | set_buffer_uptodate(bh); |
732 | if (!buffer_uptodate(bh)) { | 732 | if (!buffer_uptodate(bh)) { |
733 | ll_rw_block(READ | REQ_META, 1, &bh); | 733 | ll_rw_block(REQ_OP_READ, REQ_META, 1, &bh); |
734 | wait_on_buffer(bh); | 734 | wait_on_buffer(bh); |
735 | if (!buffer_uptodate(bh)) | 735 | if (!buffer_uptodate(bh)) |
736 | goto unlock_out; | 736 | goto unlock_out; |