Thread (1 message) 1 message, 1 author, 2012-06-14

Re: [PATCH RFC 1/2] block: Add blk_bio_map_sg() helper

flat view

From: Asias He <hidden>
Date: 2012-06-14 08:18:35
Also in: kvm, lkml

On 06/14/2012 03:29 PM, Jens Axboe wrote:
On 2012-06-14 04:31, Tejun Heo wrote:
quoted
On Wed, Jun 13, 2012 at 03:41:46PM +0800, Asias He wrote:
quoted
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.
This may not be possible but I really wanna avoid having two copies of
that complex logic.  Any chance blk_rq_map_bio() can be implemented in
a way that allows blk_rq_map_sg() can be built on top of it?  Also,
Was thinking the same thing, definitely code we don't want to have
duplicated. We've had mapping bugs in the past.

Asias, this should be trivial to do, except that blk_rq_map_sg()
potentially maps across bio's as well. The tracking of the prev bio_vec
does not care about cross bio boundaries.
Sure. I will try this and send v2.


-- 
Asias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help