aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-08-07 14:26:21 -0700
committerKent Overstreet <kmo@daterainc.com>2013-11-23 22:33:49 -0800
commit4550dd6c6b062fc5e5b647296d55da22616123c3 (patch)
tree9ca83cc0283151980b7c2f18c0e928aa34a2a0d9 /drivers/block/nbd.c
parentblock: Convert bio_for_each_segment() to bvec_iter (diff)
downloadlinux-dev-4550dd6c6b062fc5e5b647296d55da22616123c3.tar.xz
linux-dev-4550dd6c6b062fc5e5b647296d55da22616123c3.zip
block: Immutable bio vecs
This adds a mechanism by which we can advance a bio by an arbitrary number of bytes without modifying the biovec: bio->bi_iter.bi_bvec_done indicates the number of bytes completed in the current bvec. Various driver code still needs to be updated to not refer to the bvec directly before we can use this for interesting things, like efficient bio splitting. Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Lars Ellenberg <drbd-dev@lists.linbit.com> Cc: Paul Clements <Paul.Clements@steeleye.com> Cc: drbd-user@lists.linbit.com Cc: nbd-general@lists.sourceforge.net
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index aa362f493216..55298db36b2d 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -278,7 +278,7 @@ static int nbd_send_req(struct nbd_device *nbd, struct request *req)
*/
rq_for_each_segment(bvec, req, iter) {
flags = 0;
- if (!rq_iter_last(req, iter))
+ if (!rq_iter_last(bvec, iter))
flags = MSG_MORE;
dprintk(DBG_TX, "%s: request %p: sending %d bytes data\n",
nbd->disk->disk_name, req, bvec.bv_len);