Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"alan@lxorguk.ukuu.org.uk" <alan@lxorguk.ukuu.org.uk>,
	Alan Stern <stern@rowland.harvard.edu>,
	Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [ 38/48] SCSI & usb-storage: add try_rc_10_first flag
Date: Tue, 03 Jul 2012 10:18:46 +0400	[thread overview]
Message-ID: <1341296326.3319.17.camel@dabdike> (raw)
In-Reply-To: <20120703004122.GA28804@parisc-linux.org>

On Mon, 2012-07-02 at 18:41 -0600, Matthew Wilcox wrote:
> On Mon, Jul 02, 2012 at 03:23:18PM -0700, Linus Torvalds wrote:
> > >  Martin Petersen did extensive testing of devices when we
> > > changed it and doing RC16 first is hedged around by claiming support not
> > > only for SCSI_3 but also for SBC_2 in your INQUIRY data.
> > 
> > Umm. That just smells like BS to me.
> > 
> > The "extensive testing" part was clearly not true, and it seems that
> > SCSI people sometimes forget that the biggest user (by *far*) is the
> > USB storage layer.
> 
> As James said, *at the time*, USB overrode the SBC_2 claims from USB
> devices and forced them to be SCSI_2.  So no amount of testing we did
> would have uncovered this.
> 
> > Also, your protection claim seems to be invalidated by the actual
> > code. Yes, it checks if the device claims to support protection. But
> > it *also* says "let's do that 16b command if "scsi_level >
> > SCSI_SPC_2". So your claim that it hedges around it by looking at the
> > inquiry data is pure crap. It's simply not true. Just look at the
> > code:
> 
> I wrote this code ... James' memory is off.

Yes, sorry about that ... should have looked in the git log instead of
going by memory at 01:00 after a long flight ...

>   What happened is that T10
> in their infinite wisdom decided to put things like "supports TRIM" and
> "is actually a 4k block size but fakes 512 byte blocks" in the Read
> Capacity 16 results.  So if we want to support those kinds of things
> (and I think we do), then we need to send Read Capacity 16 to devices.
> 
> It's not about "enterprise features" at all, but about supporting the
> next generation of standard consumer drives.  I'm tempted to say the
> USB Storage driver needs to go back to the way things were, because I
> don't see any other way to fix this.

But anyway, we're stuck ... we have to send RC16 first to support these
features.  We did protest to T10 at the time, but to no avail.

> I have no idea what Windows is doing to support these features.  That
> might be a fruitful course of investigation.

Hopefully one of the USB people can do this.

I still think a whitelist of USB devices sending proper SCSI level
information in the inquiry might be the best way forward.

James

  reply	other threads:[~2012-07-03  6:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120701172012.078559139@decadent.org.uk>
     [not found] ` <4FF14957.3040007@redhat.com>
     [not found]   ` <CA+55aFyRTXqSvf9m08gbHCB0WhVF14Y6J2-AiFGiuTStq0Jr6Q@mail.gmail.com>
2012-07-02 20:39     ` [ 38/48] SCSI & usb-storage: add try_rc_10_first flag James Bottomley
2012-07-02 22:23       ` Linus Torvalds
2012-07-03  0:41         ` Matthew Wilcox
2012-07-03  6:18           ` James Bottomley [this message]
2012-07-03 15:49             ` Alan Stern
2012-07-03 17:32               ` Matthew Wilcox
2012-07-03 19:50                 ` Alan Stern
2012-07-03 20:07                   ` James Bottomley
2012-07-03 20:25                     ` Alan Stern
2012-07-03 20:35                     ` Matthew Wilcox
2012-07-05 21:40                       ` Alan Stern
2012-07-06  3:05                         ` Matthew Wilcox
2012-07-06 14:00                           ` Alan Stern

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=1341296326.3319.17.camel@dabdike \
    --to=james.bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ben@decadent.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@linux-foundation.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