]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
target: Use correct SCSI status during EXTENDED_COPY exception
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 31 Oct 2016 07:54:40 +0000 (00:54 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 8 Mar 2017 13:35:51 +0000 (10:35 -0300)
commit6313e0956bebf42dd42c317e6be64d13e76c0a29
tree3a5ed605534e5034459912ac2bd88d0f4f1f43a0
parent13f543fbd93c9adbcd799e86a0198218619b2e21
target: Use correct SCSI status during EXTENDED_COPY exception

BugLink: http://bugs.launchpad.net/bugs/1664960
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/target/target_core_xcopy.c