All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] target/tcm_qla2xxx: Add TMR_ABORT_TASK support
@ 2012-02-13 11:42 Nicholas A. Bellinger
  2012-02-13 11:42 ` [PATCH 1/4] target: Add SCF_ACK_KREF flag for acknowledgement kref Nicholas A. Bellinger
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Nicholas A. Bellinger @ 2012-02-13 11:42 UTC (permalink / raw)
  To: target-devel, linux-scsi
  Cc: Andrew Vasquez, Giridhar Malavali, Arun Easi, Christoph Hellwig,
	Roland Dreier, Madhuranath Iyengar, Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

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(-)

-- 
1.7.2.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-17  8:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 11:42 [PATCH 0/4] target/tcm_qla2xxx: Add TMR_ABORT_TASK support Nicholas A. Bellinger
2012-02-13 11:42 ` [PATCH 1/4] target: Add SCF_ACK_KREF flag for acknowledgement kref Nicholas A. Bellinger
2012-02-13 11:42 ` [PATCH 2/4] target: Make target_release_cmd_kref release on empty list Nicholas A. Bellinger
2012-02-13 11:42 ` [PATCH 3/4] target: Add TMR_ABORT_TASK task management support Nicholas A. Bellinger
2012-02-13 11:42 ` [PATCH 4/4] qla_target/tcm_qla2xxx: Fix TMR_ABORT_TASK with target mode usage Nicholas A. Bellinger
2012-02-17  1:35 ` [PATCH 0/4] target/tcm_qla2xxx: Add TMR_ABORT_TASK support Andy Grover
2012-02-17  8:13   ` Nicholas A. Bellinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.