aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/storvsc_drv.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2013-02-21 15:04:51 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-02-24 04:39:44 -0500
commit3e8f4f4065901c8dfc51407e1984495e1748c090 (patch)
tree92e76f06fa74cb2ecfdf823342803234a4235c74 /drivers/scsi/storvsc_drv.c
parent98f99a8ac8d92fef74b61e8dd25df934afbbf843 (diff)
[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. 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> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r--drivers/scsi/storvsc_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 9f4e5601b610..82873e775fc3 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1156,6 +1156,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
1156 1156
1157 blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY); 1157 blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY);
1158 1158
1159 sdevice->no_write_same = 1;
1160
1159 return 0; 1161 return 0;
1160} 1162}
1161 1163
@@ -1238,6 +1240,8 @@ static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd)
1238 u8 scsi_op = scmnd->cmnd[0]; 1240 u8 scsi_op = scmnd->cmnd[0];
1239 1241
1240 switch (scsi_op) { 1242 switch (scsi_op) {
1243 /* the host does not handle WRITE_SAME, log accident usage */
1244 case WRITE_SAME:
1241 /* 1245 /*
1242 * smartd sends this command and the host does not handle 1246 * smartd sends this command and the host does not handle
1243 * this. So, don't send it. 1247 * this. So, don't send it.