]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: scsi_debug: Use TASK SET FULL more
authorDouglas Gilbert <dgilbert@interlog.com>
Sun, 9 Jan 2022 01:28:47 +0000 (20:28 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Jan 2022 05:25:05 +0000 (00:25 -0500)
commit335d3199ad13c1705472b19e5a64e38d7f3c439e
treed4cd375e0f99ac5f5351d9739cc9b7557c19c0f8
parent83eafc6f146aaa9ba5fb02d096af4e6c88be8540
scsi: scsi_debug: Use TASK SET FULL more

When the internal in_use bit array in this driver is full returning
SCSI_MLQUEUE_HOST_BUSY leads to the mid-level reissuing the request which
is unhelpful. Previously TASK SET FULL status was only returned if ALL_TSF
[0x400] is placed in the opts variable (at load time or via sysfs). Now
ignore that setting and always return TASK SET FULL when in_use array is
full. Also set DID_ABORT together with TASK SET FULL so the mid-level gives
up immediately.

Aside: the situations addressed by this patch lead to lockups and
timeouts. They have only been detected when blk_poll() is used. That
mechanism is relatively new in the SCSI subsystem suggesting the mid-level
may need more work in that area.

Link: https://lore.kernel.org/r/20220109012853.301953-4-dgilbert@interlog.com
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c