block: use bio_for_each_bvec() to map sg
authorMing Lei <ming.lei@redhat.com>
Fri, 15 Feb 2019 11:13:13 +0000 (19:13 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 Feb 2019 15:40:11 +0000 (08:40 -0700)
commit862e5a5e6fa2c7fd514c179e9ceea27a49a3327f
tree6a1879d86c915819457f0da282738dcad61f8737
parentdcebd755926b0f39dd1e3ef75bd3b46943400df0
block: use bio_for_each_bvec() to map sg

It is more efficient to use bio_for_each_bvec() to map sg, meantime
we have to consider splitting multipage bvec as done in blk_bio_segment_split().

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c