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 /drivers/message | |
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 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index dd239bdbfcb4..00d339c361fc 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -2235,10 +2235,10 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
2235 | } | 2235 | } |
2236 | 2236 | ||
2237 | /* do we need to support multiple segments? */ | 2237 | /* do we need to support multiple segments? */ |
2238 | if (bio_segments(req->bio) > 1 || bio_segments(rsp->bio) > 1) { | 2238 | if (bio_multiple_segments(req->bio) || |
2239 | printk(MYIOC_s_ERR_FMT "%s: multiple segments req %u %u, rsp %u %u\n", | 2239 | bio_multiple_segments(rsp->bio)) { |
2240 | ioc->name, __func__, bio_segments(req->bio), blk_rq_bytes(req), | 2240 | printk(MYIOC_s_ERR_FMT "%s: multiple segments req %u, rsp %u\n", |
2241 | bio_segments(rsp->bio), blk_rq_bytes(rsp)); | 2241 | ioc->name, __func__, blk_rq_bytes(req), blk_rq_bytes(rsp)); |
2242 | return -EINVAL; | 2242 | return -EINVAL; |
2243 | } | 2243 | } |
2244 | 2244 | ||