summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_internal.h
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-02-13 02:38:14 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2012-02-25 14:37:49 -0800
commit3d28934aaae5e924afedf0f5cb42e1316514da6b (patch)
tree6a11e13b7da8187339f262c14726107ccb32eb1b /drivers/target/target_core_internal.h
parentffc32d5259d107a3aa1b822e22f20b69cb9ec0a5 (diff)
downloadlinux-3d28934aaae5e924afedf0f5cb42e1316514da6b.tar.gz
linux-3d28934aaae5e924afedf0f5cb42e1316514da6b.tar.bz2
linux-3d28934aaae5e924afedf0f5cb42e1316514da6b.zip
target: Add TMR_ABORT_TASK task management support
This patch adds initial support for TMR_ABORT_TASK ops for se_cmd descriptors using se_sess->sess_cmd_list and se_cmd->cmd_kref counting. It will perform an explict abort for all outstanding se_cmd ops based upon tmr->ref_task_tag that have not been set CMD_T_COMPLETE. It will cancel se_cmd->work and wait for backing I/O to complete before attempting to send SAM_STAT_TASK_ABORTED and perform target_put_sess_cmd() to release the referenced descriptor. It also adds a CMD_T_ABORTED check into transport_complete_task() to catch the completion from backend I/O that has been aborted, and updates transport_wait_for_tasks() to allow CMD_T_ABORTED usage with core_tmr_abort_task() context. Reported-by: Roland Dreier <roland@purestorage.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_internal.h')
-rw-r--r--drivers/target/target_core_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h
index 45001364788a..b026dedb8184 100644
--- a/drivers/target/target_core_internal.h
+++ b/drivers/target/target_core_internal.h
@@ -75,6 +75,8 @@ struct se_hba *core_alloc_hba(const char *, u32, u32);
int core_delete_hba(struct se_hba *);
/* target_core_tmr.c */
+void core_tmr_abort_task(struct se_device *, struct se_tmr_req *,
+ struct se_session *);
int core_tmr_lun_reset(struct se_device *, struct se_tmr_req *,
struct list_head *, struct se_cmd *);