Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Hannes Reinecke <hare@suse.de>, emilne@redhat.com
Cc: Christoph Hellwig <hch@lst.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] sd: always scan VPD pages if thin provisioning is enabled
Date: Wed, 25 Jan 2017 07:38:05 -0800	[thread overview]
Message-ID: <1485358685.2473.6.camel@HansenPartnership.com> (raw)
In-Reply-To: <02181dcf-0177-d2f3-545e-264d87bc489b@suse.de>

On Wed, 2017-01-25 at 15:38 +0100, Hannes Reinecke wrote:
> On 01/25/2017 03:27 PM, Ewan D. Milne wrote:
> > On Wed, 2017-01-25 at 11:38 +0100, Hannes Reinecke wrote:
> > > On 01/25/2017 11:23 AM, Christoph Hellwig wrote:
> > > > On Wed, Jan 25, 2017 at 08:26:05AM +0100, Hannes Reinecke
> > > > wrote:
> > > > > For any device with an older SCSI revision we might not
> > > > > be scanning VPD pages, which results in a wrongly configured
> > > > > discard mode if thin provisioned is enabled.
> > > > > According to sbc3 any thin provisioned device (ie devices 
> > > > > which have the LBPME bit set in the output of READ 
> > > > > CAPACITY(16)) need to support VPD pages. So this patch always 
> > > > > enables VPD pages even for older SCSI revisions if thin 
> > > > > provisioning is enabled.
> > > > 
> > > > Can you explain what you need this for?  A device with a per
> > > > -SBC3 revision that wants us to use UNMAP?
> > > > 
> > > Some storage arrays essentially lie about the SCSI revision (most
> > > notably Hitachi :-), and some claim to support SPC-2 (or even 
> > > SPC) but support newer features, too. Most notably VPD pages 
> > > support. In this case it was an HP EVA claiming to support SPC-2 
> > > only, but providing thin provisioning.
> > 
> > Um, isn't this why we added:
> > 
> > commit c1d40a527e885a40bb9ea6c46a1b1145d42b66a0
> > Author: Martin K. Petersen <martin.petersen@oracle.com>
> > Date:   Tue Jul 15 12:49:17 2014 -0400
> > 
> >     scsi: add a blacklist flag which enables VPD page inquiries
> > 
> > (well, it was for storvsc, but we could add an entry for the HP
> > EVA)
> > 
> I knew someone would raise this objection :-)
> 
> Thing is, setting 'WS16' here is arguably wrong, as LPBME just means
> 'logical block provisioning management enabled', not 'WRITE SAME 16 
> with UNMAP' supported.
> 
> And we've set the restriction for scanning VPD pages rather high by
> moving it to at least SPC-3; meaning we lose out on all SPC-2 devices
> with logical block provisioning.
> 
> So rather than blacklisting each and every device (and incurring 
> loads of customer calls) I'd rather fix it once and for all.

Anything with a capacity over 2TB gets into RC16 .,. that includes a
lot of USB storage nowadays.  What would this proposed addition do to
them?

James



  reply	other threads:[~2017-01-25 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  7:26 [PATCH] sd: always scan VPD pages if thin provisioning is enabled Hannes Reinecke
2017-01-25  7:57 ` Johannes Thumshirn
2017-01-25 10:23 ` Christoph Hellwig
2017-01-25 10:38   ` Hannes Reinecke
2017-01-25 14:27     ` Ewan D. Milne
2017-01-25 14:38       ` Hannes Reinecke
2017-01-25 15:38         ` James Bottomley [this message]
2017-01-25 16:47           ` Hannes Reinecke
2017-01-26  2:45         ` Martin K. Petersen

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=1485358685.2473.6.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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