From: James Bottomley <James.Bottomley@suse.de>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Tejun Heo <tj@kernel.org>,
jeff@garzik.org, linux-ide@vger.kernel.org,
jens.axboe@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, davem@davemloft.net,
bzolnier@gmail.com
Subject: Re: [PATCH 6/8] SCSI: implement sd_unlock_native_capacity()
Date: Sun, 16 May 2010 11:00:36 -0500 [thread overview]
Message-ID: <1274025636.14187.24.camel@mulgrave.site> (raw)
In-Reply-To: <1274022457.2564.105.camel@localhost>
On Sun, 2010-05-16 at 16:07 +0100, Ben Hutchings wrote:
> On Sun, 2010-05-16 at 08:39 -0500, James Bottomley wrote:
> [...]
> > Then there's no need for anything at all in SCSI ... and it becomes a
> > whole lot more obvious how to do legacy ide (if we ever get problems
> > there).
>
> The block device set_capacity() interface is already defined and was
> implemented for the IDE disk driver some time ago. The purpose of
> Tejun's work on sd and libata is to implement this existing interface
> and so avoid a regression when users switch from IDE to libata-based
> drivers. I don't see why he should have to replace the interface as
> well.
I thought we already reached the conclusion that set_capacity wasn't the
right interface, hence the redo as a binary lock/unlock of native
capacity ... which is revoking the set_capacity interface in this patch.
The point I was making is that bdops just works for ide because it's
completely monolithic. It gives us a layering problem in SCSI because
you have to hook it into the lower layers which don't have access to
bdops (since they're an upper layer thing in SCSI).
This layering problem is partly the fault of libata ... if we had an ATA
native disk driver, it would be able to unlock the capacity on its own.
It's just we're using SCSI which has no SAT command it can issue for
this, so the functional request has to be pushed down to libata ...
leading to the need to thread it through the host template.
I was just pointing out that the whole thing is simplified if we use a
block queue function approach instead. ide_disk_t has access to the
queue, as does gendisk, so it would all "just work" with a simple call
site change if we used queue ops instead of block dev ops. The plus
side of doing it this way is that the SCSI threading becomes
unnecessary: libata gets directly hooked into the unlock function
instead of having to do it via an intermediary.
James
next prev parent reply other threads:[~2010-05-16 16:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-15 18:09 [PATCHSET] block,libata: implement ->unlock_native_capacity() Tejun Heo
2010-05-15 18:09 ` [PATCH 1/8] buffer: make invalidate_bdev() drain all percpu LRU add caches Tejun Heo
2010-05-16 7:11 ` David Miller
2010-05-15 18:09 ` [PATCH 2/8] block: restart partition scan after resizing a device Tejun Heo
2010-05-16 7:15 ` David Miller
2010-05-15 18:09 ` [PATCH 3/8] block,ide: simplify bdops->set_capacity() to ->unlock_native_capacity() Tejun Heo
2010-05-15 18:48 ` Bartlomiej Zolnierkiewicz
2010-05-15 18:58 ` Tejun Heo
2010-05-16 7:15 ` David Miller
2010-05-15 18:09 ` [PATCH 4/8] block: use struct parsed_partitions *state universally in partition check code Tejun Heo
2010-05-16 7:16 ` David Miller
2010-05-15 18:09 ` [PATCH 5/8] block: improve automatic native capacity unlocking Tejun Heo
2010-05-16 7:17 ` David Miller
2010-05-15 18:09 ` [PATCH 6/8] SCSI: implement sd_unlock_native_capacity() Tejun Heo
2010-05-16 7:18 ` David Miller
2010-05-16 13:39 ` James Bottomley
2010-05-16 15:07 ` Ben Hutchings
2010-05-16 16:00 ` James Bottomley [this message]
2010-05-16 17:00 ` Tejun Heo
2010-05-16 19:23 ` James Bottomley
2010-05-17 5:30 ` Tejun Heo
2010-06-02 17:50 ` Jeff Garzik
2010-05-15 18:09 ` [PATCH 7/8] libata: use the enlarged capacity after late HPA unlock Tejun Heo
2010-05-15 19:22 ` Jeff Garzik
2010-05-16 7:18 ` David Miller
2010-05-15 18:09 ` [PATCH 8/8] libata: implement on-demand HPA unlocking Tejun Heo
2010-05-15 19:22 ` Jeff Garzik
2010-05-16 7:19 ` David Miller
2010-05-19 7:05 ` [PATCHSET] block,libata: implement ->unlock_native_capacity() Tejun Heo
2010-05-19 7:08 ` Jens Axboe
2010-06-02 16:37 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274025636.14187.24.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=ben@decadent.org.uk \
--cc=bzolnier@gmail.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).