block: Kill bio_segments()/bi_vcnt usage
authorKent Overstreet <kmo@daterainc.com>
Tue, 24 Sep 2013 23:26:05 +0000 (16:26 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 31 Oct 2013 14:04:49 +0000 (08:04 -0600)
commit3d75d579a04be023552b45f791cd95f5b6a45ba6
tree765ddc66787185274d0323777cb7c1bad58ff142
parenteb225c28a0b3f730b50f096946aee5eef2cb9969
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ps3disk.c
drivers/md/bcache/io.c
drivers/md/raid0.c
drivers/md/raid10.c
drivers/message/fusion/mptsas.c
drivers/scsi/libsas/sas_expander.c
drivers/scsi/mpt2sas/mpt2sas_transport.c
drivers/scsi/mpt3sas/mpt3sas_transport.c
fs/bio.c
include/linux/bio.h