Skip to content

Commit e3b88ee

Browse files
Bart Van AsscheNicholas Bellinger
authored andcommitted
target: Fix handling of aborted failed commands
If a target driver (e.g. tcm_qla2xxx) calls transport_generic_request_failure() to report that receiving data has failed and that SCSI command has already been aborted by the initiator, ensure that the SCSI status ABORTED is sent back to the initiator instead of the sense code provided by the target driver. Signed-off-by: Bart Van Assche <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: David Disseldorp <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
1 parent 762b6f0 commit e3b88ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/target/target_core_transport.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,9 @@ void transport_generic_request_failure(struct se_cmd *cmd,
16471647
{
16481648
int ret = 0, post_ret = 0;
16491649

1650+
if (transport_check_aborted_status(cmd, 1))
1651+
return;
1652+
16501653
pr_debug("-----[ Storage Engine Exception for cmd: %p ITT: 0x%08llx"
16511654
" CDB: 0x%02x\n", cmd, cmd->tag, cmd->t_task_cdb[0]);
16521655
pr_debug("-----[ i_state: %d t_state: %d sense_reason: %d\n",

0 commit comments

Comments
 (0)