Re: [PATCH 03/14] block: implement blk_rq_map_kern_prealloc()

From: Tejun Heo
Date: Thu Mar 26 2009 - 03:41:58 EST


Hello,

A few issues.

Tejun Heo wrote:
>> Perhaps you could reorder the code below a bit?
>>
>> My proposal is:
>> * blk_rq_map_kern_prealloc => is simplified to be
>> int blk_rq_map_bio(struct request_queue *q, struct request *rq,
>> struct bio *bio);

The thing is that the prealloc variant should be allowed to be called
from IRQ context and blk_queue_bounce() shouldn't be called.
Hmmm... well, the caller is supposed to know what it's doing and maybe
we can just add a comment that it shouldn't be called with buffers
which might get bounced from IRQ context.

>> * The extra checks currently inside blk_rq_map_kern_prealloc are moved
>> to bio_map_kern_prealloc()
>>
>> * Users call bio_map_kern_prealloc() directly and then use blk_rq_map_bio()
>> in a two stage process.

This breaks consistency with blk_rq_map_*() family of functions. Do
you have a plan to make them all consistent? I think we really need
to maintain API consistency.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/