[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D47F3F.7000105@kernel.org>
Date: Thu, 02 Apr 2009 18:02:55 +0900
From: Tejun Heo <tj@...nel.org>
To: Boaz Harrosh <bharrosh@...asas.com>
CC: axboe@...nel.dk, linux-kernel@...r.kernel.org,
fujita.tomonori@....ntt.co.jp
Subject: Re: [PATCH 05/17] bio: cleanup rw usage
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.
Thanks.
--
tejun
--
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