Drivers: scsi: storvsc: Add blist flags
Subsystems (2)
PATCH 1/1 Drivers: scsi: storvsc: Add blist flags
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.
--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
drivers/scsi/storvsc_drv.c +13 -0
@@ -42,6 +42,7 @@#include <scsi/scsi_eh.h> #include <scsi/scsi_devinfo.h> #include <scsi/scsi_dbg.h> +#include "scsi_priv.h" /* * All wire protocol details (storage protocol between the guest and the host)
@@ -327,6 +328,8 @@ 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 200static void storvsc_on_channel_callback (void *context);
@@ -1438,6 +1441,8 @@ static void storvsc_device_destroy(struct scsi_device *sdevice)static int storvsc_device_configure (struct scsi_device *sdevice) { +int blist_flags; +scsi_adjust_queue_depth (sdevice,MSG_SIMPLE_TAG ,STORVSC_MAX_IO_REQUESTS );
@@ -1449,6 +1454,14 @@ static int storvsc_device_configure(struct scsi_device *sdevice) sdevice->no_write_same =1 ; + blist_flags =scsi_get_device_flags_keyed (sdevice,"Msft" , +"Virtual Disk" , +SCSI_DEVINFO_GLOBAL ); + +if (blist_flags != msft_blist_flags) +scsi_dev_info_list_add_keyed (1 ,"Msft" ,"Virtual Disk" ,NULL , + msft_blist_flags, +SCSI_DEVINFO_GLOBAL );return 0 ; }
Signature · 1 line
1.7.4.1
Quoted 6 lines · K. Y. Srinivasan
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_16issues.Signed-off-by K. Y. Srinivasan <[email protected]>
This looks way to complicated - should be a single line added to your slave_configure function, maybe plus a comment stating what you do in your commit message:
sdev->sdev_bflags |= BLIST_TRY_VPD_PAGES;
Quoted 18 lines
-----Original Message-----
From: Christoph Hellwig [mailto:[email protected]]
Sent: Monday, July 21, 2014 4:27 AM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Drivers: scsi: storvsc: Add blist flagsQuoted 5 lines · K. Y. Srinivasan
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 handleWRITE_SAME_16issues.
Quoted 8 lines
Quoted 1 line
Signed-off-by K. Y. Srinivasan <[email protected]>This looks way to complicated - should be a single line added to your
slave_configurefunction, maybe plus a comment stating what you do in your commit message:sdev->sdev_bflags |= BLIST_TRY_VPD_PAGES;
Thanks Christoph. We can go with this. I will re-send the patch.
K. Y