]> git.baikalelectronics.ru Git - 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)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Feb 2017 15:46:54 +0000 (07:46 -0800)
commite1d55e9af84be62bf2c55b7ca930308bb52fb74f
tree48819bdd2a955fb1e279c7aa1d13bd2551efc2cc
parent80d8821d101984cf999d869d913a8fb51753df53
target: Use correct SCSI status during EXTENDED_COPY exception

This patch adds the missing target_complete_cmd() SCSI status
parameter change in target_xcopy_do_work(), that was originally
missing in commit 473fcf28b1.

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>
drivers/target/target_core_xcopy.c