scsi: storvsc: Add ability to change scsi queue depth
Subsystems (3)
PATCH 1/1 scsi: storvsc: Add ability to change scsi queue depth
Adding functionality to allow the SCSI queue depth to be changed, by utilizing the "scsi_change_queue_depth" function.
--- drivers/scsi/storvsc_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/scsi/storvsc_drv.c +11 -0
@@ -387,6 +387,7 @@ enum storvsc_request_type {static int storvsc_ringbuffer_size = (128 *1024 );static u32 max_outstanding_req_per_channel; +static int storvsc_change_queue_depth (struct scsi_device *sdev,int queue_depth);static int storvsc_vcpus_per_sub_channel =4 ;
@@ -1711,6 +1712,7 @@ static struct scsi_host_template scsi_driver = { .dma_boundary = PAGE_SIZE-1, .no_write_same = 1, .track_queue_depth = 1, + .change_queue_depth = storvsc_change_queue_depth, };enum {
@@ -1917,6 +1919,15 @@ static int storvsc_probe(struct hv_device *device,return ret; } +/* Change a scsi target's queue depth */ +static int storvsc_change_queue_depth (struct scsi_device *sdev,int queue_depth) +{ +if (queue_depth > scsi_driver.can_queue){ + queue_depth = scsi_driver.can_queue; + } +return scsi_change_queue_depth (sdev, queue_depth); +} +static int storvsc_remove (struct hv_device *dev) {struct storvsc_device *stor_device =hv_get_drvdata (dev);
Signature · 1 line
2.17.1
From: Branden Bonaby <[email protected]> Sent: Friday, June 14, 2019 4:48 PM
Quoted 46 lines
Adding functionality to allow the SCSI queue depth to be changed, by utilizing the "
scsi_change_queue_depth" function.Signed-off-by Branden Bonaby <[email protected]>--- drivers/scsi/storvsc_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/scsi/storvsc_drv.c +11
-1@@ -387,6 +387,7 @@ enum storvsc_request_type {static int storvsc_ringbuffer_size = (128 *1024 );static u32 max_outstanding_req_per_channel; +static int storvsc_change_queue_depth (struct scsi_device *sdev,int queue_depth);static int storvsc_vcpus_per_sub_channel =4 ;@@ -1711,6 +1712,7 @@ static struct scsi_host_template scsi_driver = { .dma_boundary = PAGE_SIZE-1, .no_write_same = 1, .track_queue_depth = 1, + .change_queue_depth = storvsc_change_queue_depth, };enum {@@ -1917,6 +1919,15 @@ static int storvsc_probe(struct hv_device *device,return ret; } +/* Change a scsi target's queue depth */ +static int storvsc_change_queue_depth (struct scsi_device *sdev,int queue_depth) +{ +if (queue_depth > scsi_driver.can_queue){ + queue_depth = scsi_driver.can_queue; + } +return scsi_change_queue_depth (sdev, queue_depth); +} +static int storvsc_remove (struct hv_device *dev) {struct storvsc_device *stor_device =hv_get_drvdata (dev); --
Quoted 1 line
2.17.1
KY Srinivasan
Reviewed-byQuoted 54 lines
-----Original Message-----
From: Michael Kelley <[email protected]>
Sent: Saturday, June 15, 2019 11:19 AM
To: brandonbonaby94 <[email protected]>; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Stephen Hemminger <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: brandonbonaby94 <[email protected]>; linux- [email protected]; [email protected]; linux- [email protected]
Subject: RE: [PATCH] scsi: storvsc: Add ability to change scsi queue depthFrom: Branden Bonaby <[email protected]> Sent: Friday, June 14, 2019 4:48 PM
Quoted 14 lines
Adding functionality to allow the SCSI queue depth to be changed, by utilizing the "
scsi_change_queue_depth" function.Signed-off-by Branden Bonaby <[email protected]>--- drivers/scsi/storvsc_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/scsi/storvsc_drv.c +0
-0drivers/scsi/storvsc_drv.c enum storvsc_request_type { · line 390
Quoted 4 lines
drivers/scsi/storvsc_drv.c +1
-0@@ -387,6 +387,7 @@ enum storvsc_request_type {static int storvsc_ringbuffer_size = (128 *1024 );static u32 max_outstanding_req_per_channel; +static int storvsc_change_queue_depth(struct scsi_device *sdev, int
queue_depth);drivers/scsi/storvsc_drv.c static int storvsc_probe(struct hv_device
Quoted 12 lines
drivers/scsi/storvsc_drv.c +1
-0static int storvsc_vcpus_per_sub_channel =4 ;@@ -1711,6 +1712,7 @@ static struct scsi_host_template scsi_driver = { .dma_boundary = PAGE_SIZE-1, .no_write_same = 1, .track_queue_depth = 1, + .change_queue_depth = storvsc_change_queue_depth, };enum {@@ -1917,6 +1919,15 @@ static int storvsc_probe(struct hv_device*device,
drivers/scsi/storvsc_drv.c static int storvsc_probe(struct hv_device *device,
Quoted 5 lines
drivers/scsi/storvsc_drv.c +2
-0return ret; } +/* Change a scsi target's queue depth */ +static int storvsc_change_queue_depth(struct scsi_device *sdev, int
queue_depth)
Quoted 14 lines
Quoted 11 lines
drivers/scsi/storvsc_drv.c +7
-1+{ +if (queue_depth > scsi_driver.can_queue){ + queue_depth = scsi_driver.can_queue; + } +return scsi_change_queue_depth (sdev, queue_depth); +} +static int storvsc_remove (struct hv_device *dev) {struct storvsc_device *stor_device =hv_get_drvdata (dev); --Quoted 1 line
2.17.1
Reviewed-by Michael Kelley <[email protected]>
Martin K. Petersen
AppliedBranden,
Quoted 2 lines
Adding functionality to allow the SCSI queue depth to be changed, by utilizing the "
scsi_change_queue_depth" function.
Applied to 5.3/scsi-queue. Please run checkpatch before submission. I fixed it up this time.
Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 10 lines · Martin K. Petersen
Branden,
Quoted 2 lines
Adding functionality to allow the SCSI queue depth to be changed, by utilizing the "
scsi_change_queue_depth" function.Applied to 5.3/scsi-queue. Please run checkpatch before submission. I fixed it up this time.
Thanks!
Oh I see what you mean about the brackets, thanks will do next time.