> -----Original Message----- > From: Olaf Hering [mailto:olaf@xxxxxxxxx] > Sent: Wednesday, January 30, 2013 8:35 AM > To: KY Srinivasan > Cc: linux-scsi@xxxxxxxxxxxxxxx > Subject: Re: storvsc loops with No Sense messages > > On Wed, Jan 30, Olaf Hering wrote: > > > Is there a way to not use WRITE_SAME at all? While browsing the code its > > not clear if there is a conditional for this command. > > It seems scsi_device->no_write_same may avoid this command, I will > test this patch: > > # Subject: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME > > Set scsi_device->no_write_same because the host does not support it. > Also blacklist WRITE_SAME to avoid (and log) accident usage. > Olaf, Thanks for looking into this. Acked-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> > Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> > --- > drivers/scsi/storvsc_drv.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c > index 0144078..21f788a 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; > } > > @@ -1241,6 +1243,7 @@ static bool storvsc_scsi_cmd_ok(struct scsi_cmnd > *scmnd) > * smartd sends this command and the host does not handle > * this. So, don't send it. > */ > + case WRITE_SAME: > case SET_WINDOW: > scmnd->result = ILLEGAL_REQUEST << 16; > allowed = false; > -- > 1.8.1.1 > > ��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f