]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
block: Add blk_bio_map_sg() helper
authorAsias He <asias@redhat.com>
Thu, 2 Aug 2012 21:42:04 +0000 (23:42 +0200)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 22 Aug 2012 00:47:12 +0000 (10:47 +1000)
commit5508e0d26640eb83b9aa60f82e02d74d0373c535
tree6ba95ba45bcb977bd313b38e535108c8c5e3fc48
parent5277e47be2427ad69ee2eb86eefdfd5e02396503
block: Add blk_bio_map_sg() helper

Add a helper to map a bio to a scatterlist, modelled after
blk_rq_map_sg.

This helper is useful for any driver that wants to create
a scatterlist from its ->make_request_fn method.

Changes in v2:
 - Use __blk_segment_map_sg to avoid duplicated code
 - Add cocbook style function comment

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
block/blk-merge.c
include/linux/blkdev.h