lkml.org 
[lkml]   [2011]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]: block: try-2 (modified): Initialize bi_rw in mpage so bio_add can make use of it.
On 2011-07-11 19:52, Muthu Kumar wrote:
>> For this particular case, doing it when the bio is allocated makes more
>> sense. That will avoid a similar error in there in the future.
>>
>
> Sounds good. Thanks. How about for other cases that alloc a new bio
> and do bio_add_page() - like blkdev_issue_zeroout() and similar.
> Should we add there too?

Good question, ideally the allocator should be passed in the rw argument
since we need it before even submitting it for the merge cases. We don't
have _that_ many callers of bio_alloc() or bio_kmalloc(), so probably
the best option is just to bite the bullet and change the prototypes to
take the 'rw' argument there. Oh, and the bioset variants, too.
bio_init() should be passed the 'rw' argument from the allcators, so we
catch any private use of that, too.

--
Jens Axboe



\
 
 \ /
  Last update: 2011-07-11 20:03    [W:0.190 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site