[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D4805C.70400@panasas.com>
Date: Thu, 02 Apr 2009 12:07:40 +0300
From: Boaz Harrosh <bharrosh@...asas.com>
To: Tejun Heo <tj@...nel.org>
CC: axboe@...nel.dk, linux-kernel@...r.kernel.org,
fujita.tomonori@....ntt.co.jp
Subject: Re: [PATCH 05/17] bio: cleanup rw usage
On 04/02/2009 12:02 PM, Tejun Heo wrote:
> Boaz Harrosh wrote:
>> On 04/01/2009 04:44 PM, Tejun Heo wrote:
>>> Impact: cleanup
>>>
>>> bio confusingly uses @write_to_vm and @reading for data directions,
>>> both of which mean the opposite of the usual block/bio convention of
>>> using READ and WRITE w.r.t. IO devices. The only place where the
>>> inversion is necessary is when caling get_user_pages_fast() in
>>> bio_copy_user_iov() as the gup uses the VM convention of read/write
>>> w.r.t. VM.
>>>
>>> This patch converts all bio functions to use READ/WRITE rw parameter
>>> and let the one place where inversion is necessary to rw == READ.
>>>
>> Hi one more nit picking just if you are at it. If you want
>> I can do the work and send it to you so you can squash it into this patch.
>> See bellow
>>
>>> + if (rw == WRITE)
>>> + bio->bi_rw |= 1 << BIO_RW;
>> can we pleas have an inline that does that? Like bio_set_dir()?
>> and change all users. You will be surprised how many there are.
>>
>> It gives me an hart attack every time I have to write yet another
>> one.
>
> Things like this are actually what I'm trying to clean up. If you
> look at the whole series, at the end, there remains only one place
> which sets the flag in the blk/bio map paths and all users of
> blk_rq_map_*() interface couldn't care less about the flag because
> they provide only the necessary information through strictly defined
> API.
>
Right, I know. and its great.
I'm saying, all these other block-layer places and all
these places above block like stacking drivers and filesystems
That use generic_make_request and friends. If at it these can be
cleaned as well, in regard to this small thingy.
> Thanks.
>
I'll do it, no problems. Would you push it with your patchset?
Thanks
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists