linux/drivers/target
Nicholas Bellinger 03e98c9eb9 target: Address legacy PYX_TRANSPORT_* return code breakage
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number
of locations and addresses cases where transport_generic_request_failure()
was returning the incorrect sense upon CHECK_CONDITION status after the
v3.1 converson to use errno return codes.

This includes the conversion of transport_generic_request_failure() to
process cmd->scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT
before calling transport_send_check_condition_and_sense() to queue up
response status.  It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy
usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response
for these cases.

transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend
SCF_SCSI_DATA_SG_IO_CDB ->do_task(), and emulated ->execute_task() have
all been updated to set se_cmd->scsi_sense_reason and return errno codes
universally upon failure.  This includes cmd->scsi_sense_reason assignment
in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.

Finally it updates fabric modules to remove the legacy usage, and for
TFO->new_cmd_map() callers forwards return values outside of fabric code.
iscsi-target has also been updated to remove a handful of special cases
related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()

(v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from
     transport_generic_new_cmd, and re-add missing task->task_error_status
     assignment in transport_complete_task)

Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2011-12-06 06:00:49 +00:00
..
iscsi target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
loopback target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
tcm_fc target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +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: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +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: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_cdb.h target: use ->exectute_task for all CDB emulation 2011-11-04 10:44:35 +00:00
target_core_configfs.c target: Remove legacy se_task->task_timer and associated logic 2011-10-24 03:22:08 +00:00
target_core_device.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_fabric_configfs.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_fabric_lib.c drivers/target: Add export.h to files as required. 2011-10-31 19:31:58 -04:00
target_core_file.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +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 drivers/target: Add module.h to drivers/target files as required. 2011-10-31 19:31:59 -04:00
target_core_hba.h
target_core_iblock.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_iblock.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_pr.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_pr.h target: pass the se_task to the CDB emulation callback 2011-11-04 08:00:17 +00:00
target_core_pscsi.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_pscsi.h target: cleanup pscsi request submission 2011-10-24 03:20:44 +00:00
target_core_rd.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +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 unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_stat.h [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_tmr.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_tpg.c drivers/target: Add export.h to files as required. 2011-10-31 19:31:58 -04:00
target_core_transport.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_ua.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_ua.h