diff options
author | Kent Overstreet <koverstreet@google.com> | 2012-09-25 18:05:12 -0400 |
---|---|---|
committer | Kent Overstreet <koverstreet@google.com> | 2013-03-23 17:15:29 -0400 |
commit | f73a1c7d117d07a96d89475066188a2b79e53c48 (patch) | |
tree | b2343926df6cf7877ee398ba485a962148b67804 /include/linux/bio.h | |
parent | fb9e3534768c1daa0bd09dd00d1a8828e15079c8 (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 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index fcb4dba2d8ea..20507eb7c979 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #define bio_offset(bio) bio_iovec((bio))->bv_offset | 67 | #define bio_offset(bio) bio_iovec((bio))->bv_offset |
68 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) | 68 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) |
69 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 69 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
70 | #define bio_end_sector(bio) ((bio)->bi_sector + bio_sectors((bio))) | ||
70 | 71 | ||
71 | static inline unsigned int bio_cur_bytes(struct bio *bio) | 72 | static inline unsigned int bio_cur_bytes(struct bio *bio) |
72 | { | 73 | { |