[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BF0D491.7090802@kernel.org>
Date: Mon, 17 May 2010 07:30:57 +0200
From: Tejun Heo <tj@...nel.org>
To: James Bottomley <James.Bottomley@...e.de>
CC: Ben Hutchings <ben@...adent.org.uk>, jeff@...zik.org,
linux-ide@...r.kernel.org, jens.axboe@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
davem@...emloft.net, bzolnier@...il.com
Subject: Re: [PATCH 6/8] SCSI: implement sd_unlock_native_capacity()
Hello,
On 05/16/2010 09:23 PM, James Bottomley wrote:
>> request_queue is (or at least supposed to be) oblivious about genhd
>> and its attributes including capacity. After all, request_queue can
>> exist w/o genhd associated, so it would be quite odd to have capacity
>> related method living in request_queue.
>
> Yes, I'll sort of buy this ... although it's not quite that clean:
> barrier methods, which are only used for filesystem above block devices
> also live in the queue.
You mean prepare_flush_fn()? Hmmm...
>> Another thing is that there is no generic way to reach the associated
>> genhd from request_queue and I can't think of a clean way to map
>> request_queue to the associated ata device w/o in-flight requests (can
>> you even do that from SCSI?).
>
> No ... that's by design ... but you don't need it if all you're doing is
> unlocking the native capacity (whether on behalf of block dev ops or
> queue ops).
libata defers all those managements stuff to EH and the ata device
needs to be accessible to invoke EH. It can be worked around by
issuing a pseudo command which is trapped and deferred to EH during
command processing but it's much better to be able to access the
device directly.
>> Unfortunately, libata is still properly layered below SCSI, so I'm
>> afraid threading through sd is clumsy yet the cleanest way to do it.
>
> s/properly/im\&/
Heh, yeah. :-)
> but yes,
>
> Reluctantly-Acked-by: James Bottomley <James.Bottomley@...e.de>
Thanks. Much appreciated.
--
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