Skip to content

Commit ee44e73

Browse files
Nicholas Bellingergregkh
authored andcommitted
target: Use correct SCSI status during EXTENDED_COPY exception
commit 0583c261e6325f392c1f7a1b9112e31298e1a4bd upstream. This patch adds the missing target_complete_cmd() SCSI status parameter change in target_xcopy_do_work(), that was originally missing in commit 926317de33. It correctly propigates up the correct SCSI status during EXTENDED_COPY exception cases, instead of always using the hardcoded SAM_STAT_CHECK_CONDITION from original code. This is required for ESX host environments that expect to hit SAM_STAT_RESERVATION_CONFLICT for certain scenarios, and SAM_STAT_CHECK_CONDITION results in non-retriable status for these cases. Reported-by: Nixon Vincent <nixon.vincent@calsoftinc.com> Tested-by: Nixon Vincent <nixon.vincent@calsoftinc.com> Cc: Nixon Vincent <nixon.vincent@calsoftinc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 44d03b9 commit ee44e73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/target/target_core_xcopy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static void target_xcopy_do_work(struct work_struct *work)
836836
" CHECK_CONDITION -> sending response\n", rc);
837837
ec_cmd->scsi_status = SAM_STAT_CHECK_CONDITION;
838838
}
839-
target_complete_cmd(ec_cmd, SAM_STAT_CHECK_CONDITION);
839+
target_complete_cmd(ec_cmd, ec_cmd->scsi_status);
840840
}
841841

842842
sense_reason_t target_do_xcopy(struct se_cmd *se_cmd)

0 commit comments

Comments
 (0)