From 5f14ef7a10c4e2c746cd770a2bc0f36bfab9ed63 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 27 Aug 2014 03:00:44 +0000 Subject: [PATCH] scst/include/scst.h: Document on_abort_cmd() further Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5736 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 6056577d7..7e853dd64 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -995,7 +995,17 @@ struct scst_tgt_template { /* * Called to notify target driver that the command is being aborted. * If target driver wants to redirect processing to some outside - * processing, it should get it using scst_cmd_get(). + * processing, it should get it using scst_cmd_get(). Since this + * function is invoked from the context of a task management function + * it runs asynchronously with the regular command processing finite + * state machine. In other words, it is only safe to invoke functions + * like scst_tgt_cmd_done() or scst_rx_data() from this callback + * function if the target driver owns the command and if appropriate + * measures have been taken to avoid that the target driver would + * invoke one of these functions from the regular command processing + * path. Note: if scst_tgt_cmd_done() or scst_rx_data() is invoked + * from this callback function these must be invoked with the + * SCST_CONTEXT_THREAD argument. * * OPTIONAL */