aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorDouglas Gilbert <[email protected]>2021-04-15 01:50:31 +0000
committerMartin K. Petersen <[email protected]>2021-05-03 02:41:44 +0000
commitfc09acb7de31badb2ea9e85d21e071be1a5736e4 (patch)
tree65d53ad054ff5a2e71e81afd5293ed4992e92086 /tools/lib
parentscsi: ufs: core: Narrow down fast path in system suspend path (diff)
downloadkernel-fc09acb7de31badb2ea9e85d21e071be1a5736e4.tar.gz
kernel-fc09acb7de31badb2ea9e85d21e071be1a5736e4.zip
scsi: scsi_debug: Fix cmd_per_lun, set to max_queue
Make sure that the cmd_per_lun value placed in the host template never exceeds the can_queue value. If the max_queue driver parameter is not specified then both cmd_per_lun and can_queue are set to CAN_QUEUE. CAN_QUEUE is a compile time constant and is used to dimension an array to hold queued requests. If the max_queue driver parameter is given it is must be less than or equal to CAN_QUEUE and if so, the host template values are adjusted. Remove undocumented code that allowed queue_depth to exceed CAN_QUEUE and cause stack full type errors. There is a documented way to do that with every_nth and echo 0x8000 > /sys/bus/pseudo/drivers/scsi_debug/opts See: https://sg.danny.cz/sg/scsi_debug.html Tweak some formatting, and add a suggestion to the "trim poll_queues" warning. Link: https://lore.kernel.org/r/[email protected] Reported-by: Kashyap Desai <[email protected]> Reviewed-by: John Garry <[email protected]> Signed-off-by: Douglas Gilbert <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions