scsi: scsi_debug: Add param to control sdev's allow_restart
authorWenchao Hao <haowenchao2@huawei.com>
Tue, 10 Oct 2023 09:20:51 +0000 (17:20 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 17 Oct 2023 00:50:12 +0000 (20:50 -0400)
commit573c2d066eb950dd9bd6e8735d3a859bbc21b3cc
tree963862fa7cd5ce488327897ec5b22a87b4d9aa8e
parentf084fe52c640775de51056670f568ec7104b922a
scsi: scsi_debug: Add param to control sdev's allow_restart

Add new module param "allow_restart" to control scsi_device's allow_restart
flag. This flag determines if EH is triggered after a command completes
with sense_key 0x6, ASC 0x4 and ASCQ 0x2. EH would be triggered if
allow_restart=1 in this condition.

The new param can be used with the error injection capability to test how
commands completing with sense_key 0x6, ASC 0x4 and ASCQ 0x2 are handled.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Link: https://lore.kernel.org/r/20231010092051.608007-11-haowenchao2@huawei.com
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c