kernel-ark/drivers/target
Nicholas Bellinger 00fdc6bbef iscsi-target: Fix reservation conflict -EBUSY response handling bug
This patch addresses a iscsi-target specific bug related to reservation conflict
handling in iscsit_handle_scsi_cmd() that has been causing reservation conflicts
to complete and not fail as expected due to incorrect errno checking.  The problem
occured with the change to return -EBUSY from transport_generic_cmd_sequencer() ->
transport_generic_allocate_tasks() failures, that broke iscsit_handle_scsi_cmd()
checking for -EINVAL in order to invoke a non GOOD status response.

This was manifesting itself as data corruption with legacy SPC-2 reservations,
but also effects iscsi-target LUNs with SPC-3 persistent reservations.

This bug was originally introduced in lio-core commit:

commit 03e98c9eb9
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Fri Nov 4 02:36:16 2011 -0700

    target: Address legacy PYX_TRANSPORT_* return code breakage

Reported-by: Martin Svec <martin.svec@zoner.cz>
Cc: Martin Svec <martin.svec@zoner.cz>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-03-13 21:43:58 -07:00
..
iscsi iscsi-target: Fix reservation conflict -EBUSY response handling bug 2012-03-13 21:43:58 -07:00
loopback tcm_loop: bump max_sectors 2011-12-14 11:28:11 +00:00
tcm_fc target: Change target_submit_cmd() to return void 2012-02-07 06:41:04 +00:00
Kconfig iscsi-target: Add iSCSI fabric support for target v4.1 2011-07-26 09:16:43 +00:00
Makefile target: remove the ->transport_split_cdb callback in se_cmd 2011-10-24 03:21:15 +00:00
target_core_alua.c target: Allow control CDBs with data > 1 page 2012-01-18 08:35:58 +00:00
target_core_alua.h target: pass the se_task to the CDB emulation callback 2011-11-04 08:00:17 +00:00
target_core_cdb.c target: accept REQUEST_SENSE with 18bytes 2012-02-07 06:32:39 +00:00
target_core_configfs.c target: handle empty string writes in sysfs 2012-02-07 06:48:40 +00:00
target_core_device.c target: Allow control CDBs with data > 1 page 2012-01-18 08:35:58 +00:00
target_core_fabric_configfs.c target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_fabric_lib.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_file.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_file.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_hba.c target: header reshuffle, part2 2011-12-14 11:26:05 +00:00
target_core_iblock.c iblock: fix handling of large requests 2012-02-07 06:48:46 +00:00
target_core_iblock.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_internal.h target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_pr.c target: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE 2012-03-13 21:43:43 -07:00
target_core_pr.h target: Move core_scsi3_check_cdb_abort_and_preempt 2011-12-14 11:27:34 +00:00
target_core_pscsi.c target: Allow control CDBs with data > 1 page 2012-01-18 08:35:58 +00:00
target_core_pscsi.h target: cleanup pscsi request submission 2011-10-24 03:20:44 +00:00
target_core_rd.c target: use \n as a separator for configuration 2011-12-14 11:27:23 +00:00
target_core_rd.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_stat.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_tmr.c target: simplify target_check_cdb_and_preempt 2011-12-14 11:27:55 +00:00
target_core_tpg.c target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_transport.c target: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE 2012-03-13 21:43:43 -07:00
target_core_ua.c target: header reshuffle, part2 2011-12-14 11:26:05 +00:00
target_core_ua.h