linux_dsm_epyc7002/include/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
..
configfs_macros.h doc: fix broken references 2011-09-27 18:08:04 +02:00
target_core_base.h target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_configfs.h [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_device.h target: pass the se_task to the CDB emulation callback 2011-11-04 08:00:17 +00:00
target_core_fabric_configfs.h [SCSI] target: Add LIO target core v4.0.0-rc6 2011-01-14 10:12:29 -06:00
target_core_fabric_lib.h [SCSI] target: Add LIO target core v4.0.0-rc6 2011-01-14 10:12:29 -06:00
target_core_fabric_ops.h target: Add generic active I/O shutdown logic 2011-11-04 07:50:26 +00:00
target_core_tmr.h target: Have core_tmr_alloc_req() take an explicit GFP_xxx flag 2011-10-24 03:20:53 +00:00
target_core_tpg.h [SCSI] target: Add LIO target core v4.0.0-rc6 2011-01-14 10:12:29 -06:00
target_core_transport.h target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00