storvsc: Properly set queue depth for scsi disk
Subsystems (3)
PATCH 1/1 storvsc: Properly set queue depth for scsi disk
From: Long Li <[email protected]>
The disk queue depth should be set based on host queue depth.
While it's possible that we may have multiple disks on the host, the combined queue depths from those disks may exceed host queue depth. It's still better than hard-coding them.
Signed-off-by Long Li <[email protected]>
--- drivers/scsi/storvsc_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +2 -1
@@ -1442,6 +1442,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) sdevice->no_write_same =0 ; } +scsi_change_queue_depth (sdevice, sdevice->host->can_queue); +return 0 ; }
@@ -1691,7 +1693,6 @@ static struct scsi_host_template scsi_driver = { .eh_timed_out = storvsc_eh_timed_out, .slave_alloc = storvsc_device_alloc, .slave_configure = storvsc_device_configure, - .cmd_per_lun = 2048, .this_id = -1,/* Make sure we dont get a sg segment crosses a page boundary */ .dma_boundary = PAGE_SIZE-1,
Signature · 1 line
2.20.1