[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C80CDC6.8060100@ct.jp.nec.com>
Date: Fri, 03 Sep 2010 19:28:22 +0900
From: Kiyoshi Ueda <k-ueda@...jp.nec.com>
To: Tejun Heo <tj@...nel.org>
CC: Mike Snitzer <snitzer@...hat.com>, jaxboe@...ionio.com,
j-nomura@...jp.nec.com, jamie@...reable.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-raid@...r.kernel.org, hch@....de
Subject: Re: [PATCH] block: make sure FSEQ_DATA request has the same rq_disk
as the original
Hi Tejun,
On 09/03/2010 06:33 PM +0900, Tejun Heo wrote:
> On 09/03/2010 07:47 AM, Kiyoshi Ueda wrote:
>> By the way, I had been considering a block-layer interface which remaps
>> struct request and its bios to a block device such as:
>> void blk_remap_request(struct request *rq, struct block_device *bdev)
>> {
>> rq->rq_disk = bdev->bd_disk;
>>
>> __rq_for_each_bio(bio, rq) {
>> bio->bi_bdev = bdev->bd_disk;
>> }
>> }
>>
>> If there is such an interface and remapping drivers use it, then these
>> kind of issues may be avoided in the future.
>
> I think the problem is more with request initialization. After all,
> once bios are packed into a request, they are (or at least should be)
> just data containers. We now have multiple request init paths in
> block layer and different ones initialize different subsets and it's
> not very clear which fields are supposed to be initialized to what by
> whom.
>
> But yeah I agree removing discrepancy between request and bio would be
> nice to have too. It's not really remapping tho. Maybe just
> blk_set_rq_q() or something like that (it should also set rq->q)?
Thank you for pointing it.
Yes, the interface should also set rq->q.
About the naming of the interface, blk_set_<something> sounds
reasonable to me.
But does blk_set_rq_q() take request and queue as arguments?
Then, I'm afraid we can't find bdev for bio from given queue.
Thanks,
Kiyoshi Ueda
--
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