-
- Downloads
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>
Showing
- drivers/target/iscsi/iscsi_target.c 2 additions, 7 deletionsdrivers/target/iscsi/iscsi_target.c
- drivers/target/iscsi/iscsi_target_erl1.c 1 addition, 2 deletionsdrivers/target/iscsi/iscsi_target_erl1.c
- drivers/target/loopback/tcm_loop.c 3 additions, 21 deletionsdrivers/target/loopback/tcm_loop.c
- drivers/target/target_core_alua.c 16 additions, 9 deletionsdrivers/target/target_core_alua.c
- drivers/target/target_core_cdb.c 13 additions, 5 deletionsdrivers/target/target_core_cdb.c
- drivers/target/target_core_device.c 1 addition, 1 deletiondrivers/target/target_core_device.c
- drivers/target/target_core_file.c 4 additions, 2 deletionsdrivers/target/target_core_file.c
- drivers/target/target_core_iblock.c 9 additions, 5 deletionsdrivers/target/target_core_iblock.c
- drivers/target/target_core_pr.c 160 additions, 80 deletionsdrivers/target/target_core_pr.c
- drivers/target/target_core_pscsi.c 18 additions, 10 deletionsdrivers/target/target_core_pscsi.c
- drivers/target/target_core_rd.c 1 addition, 2 deletionsdrivers/target/target_core_rd.c
- drivers/target/target_core_tmr.c 0 additions, 4 deletionsdrivers/target/target_core_tmr.c
- drivers/target/target_core_transport.c 51 additions, 127 deletionsdrivers/target/target_core_transport.c
- drivers/target/tcm_fc/tfc_cmd.c 1 addition, 1 deletiondrivers/target/tcm_fc/tfc_cmd.c
- include/target/target_core_base.h 1 addition, 3 deletionsinclude/target/target_core_base.h
- include/target/target_core_transport.h 0 additions, 24 deletionsinclude/target/target_core_transport.h
Loading
Please register or sign in to comment