From: Olaf Hering <olaf@aepfle.de>
To: KY Srinivasan <kys@microsoft.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: storvsc loops with No Sense messages
Date: Wed, 30 Jan 2013 14:35:11 +0100 [thread overview]
Message-ID: <20130130133511.GA6290@aepfle.de> (raw)
In-Reply-To: <20130130095947.GA6626@aepfle.de>
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.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
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
next prev parent reply other threads:[~2013-01-30 13:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 15:28 storvsc loops with No Sense messages Olaf Hering
2013-01-29 15:51 ` KY Srinivasan
2013-01-29 18:56 ` Olaf Hering
2013-01-29 19:44 ` KY Srinivasan
2013-01-29 21:27 ` Olaf Hering
2013-01-30 9:59 ` Olaf Hering
2013-01-30 13:35 ` Olaf Hering [this message]
2013-01-30 18:52 ` KY Srinivasan
2013-01-30 18:16 ` KY Srinivasan
-- strict thread matches above, loose matches on Subject: below --
2013-04-16 17:00 Jari Turkia
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=20130130133511.GA6290@aepfle.de \
--to=olaf@aepfle.de \
--cc=kys@microsoft.com \
--cc=linux-scsi@vger.kernel.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 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.