[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1477728600-12938-16-git-send-email-tom.leiming@gmail.com>
Date: Sat, 29 Oct 2016 16:08:14 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Jens Axboe <axboe@...com>, linux-kernel@...r.kernel.org
Cc: linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Ming Lei <tom.leiming@...il.com>,
Hannes Reinecke <hare@...e.com>,
Mike Christie <mchristi@...hat.com>,
Minfei Huang <mnghuan@...il.com>,
Petr Mladek <pmladek@...e.com>
Subject: [PATCH 15/60] block: loop: comment on direct access to bvec table
Signed-off-by: Ming Lei <tom.leiming@...il.com>
---
drivers/block/loop.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index fa1b7a90ba11..55ce4226590d 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -485,6 +485,11 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
/* nomerge for loop request queue */
WARN_ON(cmd->rq->bio != cmd->rq->biotail);
+ /*
+ * For multipage bvec support, it is safe to pass the bvec
+ * table to iov iterator, because iov iter still uses bvec
+ * iter helpers to travese bvec.
+ */
bvec = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
iov_iter_bvec(&iter, ITER_BVEC | rw, bvec,
bio_segments(bio), blk_rq_bytes(cmd->rq));
--
2.7.4
Powered by blists - more mailing lists