diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-09-24 19:26:05 -0400 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-24 01:33:51 -0500 |
commit | 458b76ed2f9517becb74dcc8eedd70d3068ea6e4 (patch) | |
tree | b01b2150b197e0759b3ba59c0f9367d4477ebb8c /fs | |
parent | d57a5f7c6605f15f3b5134837e68b448a7cea88e (diff) |
block: Kill bio_segments()/bi_vcnt usage
When we start sharing biovecs, keeping bi_vcnt accurate for splits is
going to be error prone - and unnecessary, if we refactor some code.
So bio_segments() has to go - but most of the existing users just needed
to know if the bio had multiple segments, which is easier - add a
bio_multiple_segments() for them.
(Two of the current uses of bio_segments() are going to go away in a
couple patches, but the current implementation of bio_segments() is
unsafe as soon as we start doing driver conversions for immutable
biovecs - so implement a dumb version for bisectability, it'll go away
in a couple patches)
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Neil Brown <neilb@suse.de>
Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1733,7 +1733,7 @@ struct bio_pair *bio_split(struct bio *bi, int first_sectors) | |||
1733 | trace_block_split(bdev_get_queue(bi->bi_bdev), bi, | 1733 | trace_block_split(bdev_get_queue(bi->bi_bdev), bi, |
1734 | bi->bi_iter.bi_sector + first_sectors); | 1734 | bi->bi_iter.bi_sector + first_sectors); |
1735 | 1735 | ||
1736 | BUG_ON(bio_segments(bi) > 1); | 1736 | BUG_ON(bio_multiple_segments(bi)); |
1737 | atomic_set(&bp->cnt, 3); | 1737 | atomic_set(&bp->cnt, 3); |
1738 | bp->error = 0; | 1738 | bp->error = 0; |
1739 | bp->bio1 = *bi; | 1739 | bp->bio1 = *bi; |