aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2012-09-25 18:05:12 -0400
committerKent Overstreet <koverstreet@google.com>2013-03-23 17:15:29 -0400
commitf73a1c7d117d07a96d89475066188a2b79e53c48 (patch)
treeb2343926df6cf7877ee398ba485a962148b67804 /fs/btrfs/extent_io.c
parentfb9e3534768c1daa0bd09dd00d1a8828e15079c8 (diff)
block: Add bio_end_sector()
Just a little convenience macro - main reason to add it now is preparing for immutable bio vecs, it'll reduce the size of the patch that puts bi_sector/bi_size/bi_idx into a struct bvec_iter. Signed-off-by: Kent Overstreet <koverstreet@google.com> CC: Jens Axboe <axboe@kernel.dk> CC: Lars Ellenberg <drbd-dev@lists.linbit.com> CC: Jiri Kosina <jkosina@suse.cz> CC: Alasdair Kergon <agk@redhat.com> CC: dm-devel@redhat.com CC: Neil Brown <neilb@suse.de> CC: Martin Schwidefsky <schwidefsky@de.ibm.com> CC: Heiko Carstens <heiko.carstens@de.ibm.com> CC: linux-s390@vger.kernel.org CC: Chris Mason <chris.mason@fusionio.com> CC: Steven Whitehouse <swhiteho@redhat.com> Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f173c5af6461..bed072aa461f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2527,8 +2527,7 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree,
2527 if (old_compressed) 2527 if (old_compressed)
2528 contig = bio->bi_sector == sector; 2528 contig = bio->bi_sector == sector;
2529 else 2529 else
2530 contig = bio->bi_sector + (bio->bi_size >> 9) == 2530 contig = bio_end_sector(bio) == sector;
2531 sector;
2532 2531
2533 if (prev_bio_flags != bio_flags || !contig || 2532 if (prev_bio_flags != bio_flags || !contig ||
2534 merge_bio(rw, tree, page, offset, page_size, bio, bio_flags) || 2533 merge_bio(rw, tree, page, offset, page_size, bio, bio_flags) ||