All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
@ 2013-01-30 14:44 Olaf Hering
  2013-02-11 16:06 ` Olaf Hering
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2013-01-30 14:44 UTC (permalink / raw)
  To: linux-scsi; +Cc: Olaf Hering, KY Srinivasan

Set scsi_device->no_write_same because the host does not support it.
Also blacklist WRITE_SAME to avoid (and log) accident usage.

If the guest uses the ext4 filesystem, storvsc hangs while it prints
these messages in an endless loop:
...
[  161.459523] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6
[  161.462157] sd 2:0:0:0: [sda]
[  161.463135] Sense Key : No Sense [current]
[  161.464983] sd 2:0:0:0: [sda]
[  161.465899] Add. Sense: No additional sense information
[  161.468211] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6
[  161.475766] sd 2:0:0:0: [sda]
[  161.476728] Sense Key : No Sense [current]
[  161.478284] sd 2:0:0:0: [sda]
[  161.479441] Add. Sense: No additional sense information
...

This happens with a guest running on Windows Server 2012, but happens to
work while running on Windows Server 2008. WRITE_SAME isnt really
supported by both versions, so disable the command usage globally.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: KY Srinivasan <kys@microsoft.com>
---
 drivers/scsi/storvsc_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 0144078..314586c 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1155,6 +1155,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
 
 	blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY);
 
+	sdevice->no_write_same = 1;
+
 	return 0;
 }
 
@@ -1237,6 +1239,8 @@ static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd)
 	u8 scsi_op = scmnd->cmnd[0];
 
 	switch (scsi_op) {
+	/* the host does not handle WRITE_SAME, log accident usage */
+	case WRITE_SAME:
 	/*
 	 * smartd sends this command and the host does not handle
 	 * this. So, don't send it.
-- 
1.8.1.1


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

* Re: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
  2013-01-30 14:44 [PATCH] scsi: storvsc: avoid usage of WRITE_SAME Olaf Hering
@ 2013-02-11 16:06 ` Olaf Hering
  2013-02-16 15:20   ` KY Srinivasan
  2013-02-20 21:48   ` KY Srinivasan
  0 siblings, 2 replies; 4+ messages in thread
From: Olaf Hering @ 2013-02-11 16:06 UTC (permalink / raw)
  To: linux-scsi, James Bottomley; +Cc: KY Srinivasan

James,

this patch fixes a regression in 3.8. Please try to include it in final 3.8.
There is also another outstanding fix regarding sglist init from KY.

Olaf

On Wed, Jan 30, Olaf Hering wrote:

> Set scsi_device->no_write_same because the host does not support it.
> Also blacklist WRITE_SAME to avoid (and log) accident usage.
> 
> If the guest uses the ext4 filesystem, storvsc hangs while it prints
> these messages in an endless loop:


>  drivers/scsi/storvsc_drv.c | 4 ++++
>  1 file changed, 4 insertions(+)

> +	sdevice->no_write_same = 1;


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

* RE: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
  2013-02-11 16:06 ` Olaf Hering
@ 2013-02-16 15:20   ` KY Srinivasan
  2013-02-20 21:48   ` KY Srinivasan
  1 sibling, 0 replies; 4+ messages in thread
From: KY Srinivasan @ 2013-02-16 15:20 UTC (permalink / raw)
  To: Olaf Hering, linux-scsi, James Bottomley



> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Monday, February 11, 2013 11:07 AM
> To: linux-scsi@vger.kernel.org; James Bottomley
> Cc: KY Srinivasan
> Subject: Re: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
> 
> James,
> 
> this patch fixes a regression in 3.8. Please try to include it in final 3.8.
> There is also another outstanding fix regarding sglist init from KY.
> 
> Olaf
> 
> On Wed, Jan 30, Olaf Hering wrote:
> 
> > Set scsi_device->no_write_same because the host does not support it.
> > Also blacklist WRITE_SAME to avoid (and log) accident usage.
> >
> > If the guest uses the ext4 filesystem, storvsc hangs while it prints
> > these messages in an endless loop:
> 
> 
> >  drivers/scsi/storvsc_drv.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> > +	sdevice->no_write_same = 1;
> 
> 

James,

Ping. Can these make the 3.8 release.


Regards,

K. Y

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

* RE: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
  2013-02-11 16:06 ` Olaf Hering
  2013-02-16 15:20   ` KY Srinivasan
@ 2013-02-20 21:48   ` KY Srinivasan
  1 sibling, 0 replies; 4+ messages in thread
From: KY Srinivasan @ 2013-02-20 21:48 UTC (permalink / raw)
  To: Olaf Hering, linux-scsi, James Bottomley; +Cc: KY Srinivasan



> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Monday, February 11, 2013 11:07 AM
> To: linux-scsi@vger.kernel.org; James Bottomley
> Cc: KY Srinivasan
> Subject: Re: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
> 
> James,
> 
> this patch fixes a regression in 3.8. Please try to include it in final 3.8.
> There is also another outstanding fix regarding sglist init from KY.
> 
> Olaf

Ping.

K. Y
> 
> On Wed, Jan 30, Olaf Hering wrote:
> 
> > Set scsi_device->no_write_same because the host does not support it.
> > Also blacklist WRITE_SAME to avoid (and log) accident usage.
> >
> > If the guest uses the ext4 filesystem, storvsc hangs while it prints
> > these messages in an endless loop:
> 
> 
> >  drivers/scsi/storvsc_drv.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> > +	sdevice->no_write_same = 1;
> 
> 


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

end of thread, other threads:[~2013-02-20 21:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30 14:44 [PATCH] scsi: storvsc: avoid usage of WRITE_SAME Olaf Hering
2013-02-11 16:06 ` Olaf Hering
2013-02-16 15:20   ` KY Srinivasan
2013-02-20 21:48   ` KY Srinivasan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.