summaryrefslogtreecommitdiff
path: root/drivers/scsi/mesh.c
diff options
context:
space:
mode:
authorWenchao Hao <haowenchao2@huawei.com>2023-10-10 17:20:46 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2023-10-16 20:50:11 -0400
commit33bccf55c20b66dfca6644c8dc9b396cec82e85c (patch)
treefe336dec918441c2a270897dc3df7ba0e94b5013 /drivers/scsi/mesh.c
parent32be8b6e22eb76a08c66414593ef02d5eb151be7 (diff)
scsi: scsi_debug: Return failed value if error is injected
If a fail queuecommand error is injected, return the failed value defined in the rule from queuecommand. Make queuecommand return format: +--------+------+-------------------------------------------------------+ | Column | Type | Description | +--------+------+-------------------------------------------------------+ | 1 | u8 | Error type, fixed to 0x1 | +--------+------+-------------------------------------------------------+ | 2 | s32 | Error count | | | | 0: this rule will be ignored | | | | positive: the rule will always take effect | | | | negative: the rule takes effect n times where -n is | | | | the value given. Ignored after n times | +--------+------+-------------------------------------------------------+ | 3 | x8 | SCSI command opcode, 0xff for all commands | +--------+------+-------------------------------------------------------+ | 4 | x32 | The queuecommand() return value we want | +--------+------+-------------------------------------------------------+ Examples: error=/sys/kernel/debug/scsi_debug/0:0:0:1/error echo "1 1 0x12 0x1055" > ${error} will make each INQUIRY command sent to that device return 0x1055 (SCSI_MLQUEUE_HOST_BUSY). Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Wenchao Hao <haowenchao2@huawei.com> Link: https://lore.kernel.org/r/20231010092051.608007-6-haowenchao2@huawei.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mesh.c')
0 files changed, 0 insertions, 0 deletions