linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
@ 2014-12-10  8:38 Long Li
  2014-12-10 20:57 ` Sitsofe Wheeler
  2014-12-10 21:12 ` Martin K. Petersen
  0 siblings, 2 replies; 10+ messages in thread
From: Long Li @ 2014-12-10  8:38 UTC (permalink / raw)
  To: kys, haiyangz, JBottomley; +Cc: linux-scsi, devel, linux-kernel, Long Li

MSFT targets currently claim SPC-2 compliance while they implement post SPC-2 features. With this patch we can correctly handle WRITE_SAME_16 issues.

This patch fixes an issue where the flag is setup too late in drive initialization process.

Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/scsi/scsi_devinfo.c |  1 +
 drivers/scsi/storvsc_drv.c  | 10 ----------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index c1d04d4..f6fe0b2 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -211,6 +211,7 @@ static struct {
 	{"Medion", "Flash XL  MMC/SD", "2.6D", BLIST_FORCELUN},
 	{"MegaRAID", "LD", NULL, BLIST_FORCELUN},
 	{"MICROP", "4110", NULL, BLIST_NOTQ},
+	{"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES},
 	{"MYLEX", "DACARMRB", "*", BLIST_REPORTLUN2},
 	{"nCipher", "Fastness Crypto", NULL, BLIST_FORCELUN},
 	{"NAKAMICH", "MJ-4.8S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index e3ba251..2452bb4 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -327,8 +327,6 @@ MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
  */
 static int storvsc_timeout = 180;
 
-static int msft_blist_flags = BLIST_TRY_VPD_PAGES;
-
 #define STORVSC_MAX_IO_REQUESTS				200
 
 static void storvsc_on_channel_callback(void *context);
@@ -1439,14 +1437,6 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
 
 	sdevice->no_write_same = 1;
 
-	/*
-	 * Add blist flags to permit the reading of the VPD pages even when
-	 * the target may claim SPC-2 compliance. MSFT targets currently
-	 * claim SPC-2 compliance while they implement post SPC-2 features.
-	 * With this patch we can correctly handle WRITE_SAME_16 issues.
-	 */
-	sdevice->sdev_bflags |= msft_blist_flags;
-
 	return 0;
 }
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10  8:38 [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2 Long Li
@ 2014-12-10 20:57 ` Sitsofe Wheeler
  2014-12-10 22:33   ` Long Li
  2014-12-10 21:12 ` Martin K. Petersen
  1 sibling, 1 reply; 10+ messages in thread
From: Sitsofe Wheeler @ 2014-12-10 20:57 UTC (permalink / raw)
  To: Long Li; +Cc: kys, haiyangz, JBottomley, linux-scsi, devel, linux-kernel

On Wed, Dec 10, 2014 at 12:38:25AM -0800, Long Li wrote:
> MSFT targets currently claim SPC-2 compliance while they implement
> post SPC-2 features. With this patch we can correctly handle
> WRITE_SAME_16 issues.
> 
> This patch fixes an issue where the flag is setup too late in drive
> initialization process.

Li, is this a fix for the issue I keep whinging about over in
https://lkml.org/lkml/2014/10/21/23 ?

If is the same issue you may want to CC Martin on this...

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10  8:38 [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2 Long Li
  2014-12-10 20:57 ` Sitsofe Wheeler
@ 2014-12-10 21:12 ` Martin K. Petersen
  2014-12-10 22:28   ` Long Li
  1 sibling, 1 reply; 10+ messages in thread
From: Martin K. Petersen @ 2014-12-10 21:12 UTC (permalink / raw)
  To: Long Li; +Cc: kys, haiyangz, JBottomley, linux-scsi, devel, linux-kernel

>>>>> "Long" == Long Li <longli@microsoft.com> writes:

Long> MSFT targets currently claim SPC-2 compliance while they implement
Long> post SPC-2 features. With this patch we can correctly handle
Long> WRITE_SAME_16 issues.

Handle the issues or handle WRITE SAME(10/16)?

+	{"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES},

Is that version field meaningful or is it safe for us to inquire about
VPD pages without problems on older versions?

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10 21:12 ` Martin K. Petersen
@ 2014-12-10 22:28   ` Long Li
  2014-12-10 23:30     ` KY Srinivasan
  2014-12-12  3:03     ` Martin K. Petersen
  0 siblings, 2 replies; 10+ messages in thread
From: Long Li @ 2014-12-10 22:28 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: KY Srinivasan, Haiyang Zhang, JBottomley, linux-scsi, devel,
	linux-kernel

> >>>>> "Long" == Long Li <longli@microsoft.com> writes:
> 
> Long> MSFT targets currently claim SPC-2 compliance while they implement
> Long> post SPC-2 features. With this patch we can correctly handle
> Long> WRITE_SAME_16 issues.
> 
> Handle the issues or handle WRITE SAME(10/16)?

With this patch, the SCSI layer will be able to correctly send WRITE_SAME_16 to the Hyper-V host. It will not send WRITE_SAME_10: it has been disabled in the driver template. Do you want me to send another patch with these details?

> 
> +	{"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES},
> 
> Is that version field meaningful or is it safe for us to inquire about VPD pages
> without problems on older versions?

This version is used in all current Hyper-V hosts: Windows 2008 R2, 2012 and 2012 R2. However it may change in future Windows releases.

> 
> --
> Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10 20:57 ` Sitsofe Wheeler
@ 2014-12-10 22:33   ` Long Li
  0 siblings, 0 replies; 10+ messages in thread
From: Long Li @ 2014-12-10 22:33 UTC (permalink / raw)
  To: Sitsofe Wheeler
  Cc: KY Srinivasan, Haiyang Zhang, JBottomley, linux-scsi, devel,
	linux-kernel

> -----Original Message-----
> From: Sitsofe Wheeler [mailto:sitsofe@gmail.com]
> Sent: Wednesday, December 10, 2014 12:58 PM
> To: Long Li
> Cc: KY Srinivasan; Haiyang Zhang; JBottomley@parallels.com; linux-
> scsi@vger.kernel.org; devel@linuxdriverproject.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
> 
> On Wed, Dec 10, 2014 at 12:38:25AM -0800, Long Li wrote:
> > MSFT targets currently claim SPC-2 compliance while they implement
> > post SPC-2 features. With this patch we can correctly handle
> > WRITE_SAME_16 issues.
> >
> > This patch fixes an issue where the flag is setup too late in drive
> > initialization process.
> 
> Li, is this a fix for the issue I keep whinging about over in
> https://lkml.org/lkml/2014/10/21/23 ?
> 
> If is the same issue you may want to CC Martin on this...

This is only for fixing WRITE_SAME_16. The rest of the thin provisioning (e.g. UNMAP) is still broken on SPC-2.

> 
> --
> Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10 22:28   ` Long Li
@ 2014-12-10 23:30     ` KY Srinivasan
  2014-12-11 10:53       ` Sitsofe Wheeler
  2014-12-12  3:03     ` Martin K. Petersen
  1 sibling, 1 reply; 10+ messages in thread
From: KY Srinivasan @ 2014-12-10 23:30 UTC (permalink / raw)
  To: Long Li, Martin K. Petersen
  Cc: Haiyang Zhang, JBottomley, linux-scsi, devel, linux-kernel



> -----Original Message-----
> From: Long Li
> Sent: Wednesday, December 10, 2014 2:28 PM
> To: Martin K. Petersen
> Cc: KY Srinivasan; Haiyang Zhang; JBottomley@parallels.com; linux-
> scsi@vger.kernel.org; devel@linuxdriverproject.org; linux-
> kernel@vger.kernel.org
> Subject: RE: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
> 
> > >>>>> "Long" == Long Li <longli@microsoft.com> writes:
> >
> > Long> MSFT targets currently claim SPC-2 compliance while they
> > Long> implement post SPC-2 features. With this patch we can correctly
> > Long> handle
> > Long> WRITE_SAME_16 issues.
> >
> > Handle the issues or handle WRITE SAME(10/16)?
> 
> With this patch, the SCSI layer will be able to correctly send WRITE_SAME_16
> to the Hyper-V host. It will not send WRITE_SAME_10: it has been disabled in
> the driver template. Do you want me to send another patch with these
> details?
> 
> >
> > +	{"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES},
> >
> > Is that version field meaningful or is it safe for us to inquire about
> > VPD pages without problems on older versions?
> 
> This version is used in all current Hyper-V hosts: Windows 2008 R2, 2012 and
> 2012 R2. However it may change in future Windows releases.

The next version of the host will be claiming conformance to SPC-3

K. Y
> 
> >
> > --
> > Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10 23:30     ` KY Srinivasan
@ 2014-12-11 10:53       ` Sitsofe Wheeler
  2014-12-11 18:49         ` KY Srinivasan
  0 siblings, 1 reply; 10+ messages in thread
From: Sitsofe Wheeler @ 2014-12-11 10:53 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: Long Li, Martin K. Petersen, Haiyang Zhang, JBottomley,
	linux-scsi, devel, linux-kernel

On Wed, Dec 10, 2014 at 11:30:30PM +0000, KY Srinivasan wrote:
> 
> > >
> > > +	{"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES},
> > >
> > > Is that version field meaningful or is it safe for us to inquire about
> > > VPD pages without problems on older versions?
> > 
> > This version is used in all current Hyper-V hosts: Windows 2008 R2, 2012 and
> > 2012 R2. However it may change in future Windows releases.
> 
> The next version of the host will be claiming conformance to SPC-3

Will the version number ("1.0") of Virtual Disks also be changed? Part
of me hopes it will as it will mean certain quirks for virtual disks
will be easier to apply and won't need host version (are you 2008, 2012,
2016) version logic...

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-11 10:53       ` Sitsofe Wheeler
@ 2014-12-11 18:49         ` KY Srinivasan
  0 siblings, 0 replies; 10+ messages in thread
From: KY Srinivasan @ 2014-12-11 18:49 UTC (permalink / raw)
  To: Sitsofe Wheeler
  Cc: Long Li, Martin K. Petersen, Haiyang Zhang, JBottomley,
	linux-scsi, devel, linux-kernel



> -----Original Message-----
> From: Sitsofe Wheeler [mailto:sitsofe@gmail.com]
> Sent: Thursday, December 11, 2014 2:54 AM
> To: KY Srinivasan
> Cc: Long Li; Martin K. Petersen; Haiyang Zhang; JBottomley@parallels.com;
> linux-scsi@vger.kernel.org; devel@linuxdriverproject.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
> 
> On Wed, Dec 10, 2014 at 11:30:30PM +0000, KY Srinivasan wrote:
> >
> > > >
> > > > +	{"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES},
> > > >
> > > > Is that version field meaningful or is it safe for us to inquire
> > > > about VPD pages without problems on older versions?
> > >
> > > This version is used in all current Hyper-V hosts: Windows 2008 R2,
> > > 2012 and
> > > 2012 R2. However it may change in future Windows releases.
> >
> > The next version of the host will be claiming conformance to SPC-3
> 
> Will the version number ("1.0") of Virtual Disks also be changed? Part of me
> hopes it will as it will mean certain quirks for virtual disks will be easier to
> apply and won't need host version (are you 2008, 2012,
> 2016) version logic...

Spoke to the folks on Windows side of the house. They currently don't have plans to
Change the version number ("1.0").

K. Y
> 
> --
> Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-10 22:28   ` Long Li
  2014-12-10 23:30     ` KY Srinivasan
@ 2014-12-12  3:03     ` Martin K. Petersen
  2014-12-16  2:11       ` Long Li
  1 sibling, 1 reply; 10+ messages in thread
From: Martin K. Petersen @ 2014-12-12  3:03 UTC (permalink / raw)
  To: Long Li
  Cc: Martin K. Petersen, KY Srinivasan, Haiyang Zhang, JBottomley,
	linux-scsi, devel, linux-kernel

>>>>> "Long" == Long Li <longli@microsoft.com> writes:

>> Handle the issues or handle WRITE SAME(10/16)?

Long> With this patch, the SCSI layer will be able to correctly send
Long> WRITE_SAME_16 to the Hyper-V host. It will not send WRITE_SAME_10:
Long> it has been disabled in the driver template. Do you want me to
Long> send another patch with these details?

no_write_same prevents us from attempting to use WRITE SAME(10/16) to
zero block ranges.

This is completely orthogonal to using the WRITE SAME(10/16) commands
with the UNMAP bit set to discard block ranges. The latter is controlled
by the logical block provisioning heuristics and is not affected by
no_write_same at all.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
  2014-12-12  3:03     ` Martin K. Petersen
@ 2014-12-16  2:11       ` Long Li
  0 siblings, 0 replies; 10+ messages in thread
From: Long Li @ 2014-12-16  2:11 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: KY Srinivasan, Haiyang Zhang, JBottomley, linux-scsi, devel,
	linux-kernel

Thanks Martin for the explanation.

I'll send out another patch.

> -----Original Message-----
> From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
> Sent: Thursday, December 11, 2014 7:04 PM
> To: Long Li
> Cc: Martin K. Petersen; KY Srinivasan; Haiyang Zhang;
> JBottomley@parallels.com; linux-scsi@vger.kernel.org;
> devel@linuxdriverproject.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2
> 
> >>>>> "Long" == Long Li <longli@microsoft.com> writes:
> 
> >> Handle the issues or handle WRITE SAME(10/16)?
> 
> Long> With this patch, the SCSI layer will be able to correctly send
> Long> WRITE_SAME_16 to the Hyper-V host. It will not send WRITE_SAME_10:
> Long> it has been disabled in the driver template. Do you want me to
> Long> send another patch with these details?
> 
> no_write_same prevents us from attempting to use WRITE SAME(10/16) to zero
> block ranges.
> 
> This is completely orthogonal to using the WRITE SAME(10/16) commands with
> the UNMAP bit set to discard block ranges. The latter is controlled by the logical
> block provisioning heuristics and is not affected by no_write_same at all.
> 
> --
> Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-12-16  2:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-10  8:38 [PATCH] scsi:storvsc enable reading from VPD pages on SPC-2 Long Li
2014-12-10 20:57 ` Sitsofe Wheeler
2014-12-10 22:33   ` Long Li
2014-12-10 21:12 ` Martin K. Petersen
2014-12-10 22:28   ` Long Li
2014-12-10 23:30     ` KY Srinivasan
2014-12-11 10:53       ` Sitsofe Wheeler
2014-12-11 18:49         ` KY Srinivasan
2014-12-12  3:03     ` Martin K. Petersen
2014-12-16  2:11       ` Long Li

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).