target/tcm_qla2xxx: Add TMR_ABORT_TASK support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | target: Add SCF_ACK_KREF flag for acknowledgement krefdrivers/ include/ | +5 | 0 replies | |
| 2/4 | target: Make target_release_cmd_kref release on empty listdrivers/ | +1 | 0 replies | |
| 3/4 | target: Add TMR_ABORT_TASK task management supportdrivers/ drivers/ drivers/ | +79 | 0 replies | |
| 4/4 | qla_target/tcm_qla2xxx: Fix TMR_ABORT_TASK with target mode usagedrivers/ drivers/ drivers/ +1 more | +15 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] target/tcm_qla2xxx: Add TMR_ABORT_TASK support
From: Nicholas Bellinger <[email protected]>
Hi folks,
The following series adds explict TMR_ABORT_TASK support using session command list descriptors for target_submit_cmd() fabric module users.
The logic performs explict abort using tmr->ref_task_tag for outstanding descriptors have not been set CMD_T_COMPLETE in transport_complete_task() during backend I/O completion. It also cancels se_cmd->work and wait for backing I/O to complete before attempting to send SAM_STAT_TASK_ABORTED and perform necessary target_put_sess_cmd() to drop outstanding cmd_kref references.
So far this has been tested with tcm_qla2xxx using target-core debug code to simulate delayed execution of a referenced tag descriptor in the following locations:
- Before execution of tasks in transport_generic_new_cmd()
- Before completion of tasks in transport_complete_task()
- After completion of tasks in transport_complete_task()
The code can use some more testing and review, but so far these changes with simulated I/O delays are generating SAM_STAT_TASK_ABORTED status for the aborted tag, or failing with TMR_TASK_DOES_NOT_EXIST as expected..
Please have a look,
--nab
Nicholas Bellinger (4):
target: Add SCF_ACK_KREF flag for acknowledgement kref
target: Make target_release_cmd_kref release on empty list
target: Add TMR_ABORT_TASK task management support qla_target/tcm_qla2xxx: Fix TMR_ABORT_TASK with target mode usage
drivers/scsi/qla2xxx/qla_target.c | 15 +++---- drivers/scsi/qla2xxx/qla_target.h | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 6 ++- drivers/scsi/qla2xxx/tcm_qla2xxx.h | 3 +- drivers/target/target_core_internal.h | 2 + drivers/target/target_core_tmr.c | 64 ++++++++++++++++++++++++++++++++ drivers/target/target_core_transport.c | 26 ++++++++---- include/target/target_core_base.h | 3 +- 8 files changed, 100 insertions(+), 21 deletions(-)
Signature · 1 line
1.7.2.5