diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-10-31 00:54:40 -0700 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-03-06 17:31:13 -0500 |
commit | 7722fbf8d70329f729339b3631abe06c0a613c91 (patch) | |
tree | b0a177fb67f921b519a8040130991fd5b0f268c0 /drivers/target | |
parent | be97d0ec54e1b75e28f2f238c3b0310396028215 (diff) |
target: Use correct SCSI status during EXTENDED_COPY exception
[ Upstream commit 0583c261e6325f392c1f7a1b9112e31298e1a4bd ]
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>
Cc: stable@vger.kernel.org # 3.14+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_xcopy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c index ddb0d6bc45f2..71778b1e4c7b 100644 --- a/drivers/target/target_core_xcopy.c +++ b/drivers/target/target_core_xcopy.c @@ -849,7 +849,7 @@ out: " CHECK_CONDITION -> sending response\n", rc); ec_cmd->scsi_status = SAM_STAT_CHECK_CONDITION; } - target_complete_cmd(ec_cmd, SAM_STAT_CHECK_CONDITION); + target_complete_cmd(ec_cmd, ec_cmd->scsi_status); } sense_reason_t target_do_xcopy(struct se_cmd *se_cmd) |