On 10/14/2015 05:49 AM, Christoph Hellwig wrote:
On Tue, Oct 13, 2015 at 10:01:45AM -0700, Bart Van Assche wrote:
On 10/13/2015 06:18 AM, Christoph Hellwig wrote:
+ trace_target_cmd_complete(cmd);
+ cmd->se_tfo->queue_status(cmd);
+ transport_cmd_check_stop_to_fabric(cmd);
+ } else {
+ /*
+ * Allow the fabric driver to unmap any resources before
+ * releasing the descriptor via TFO->release_cmd()
+ */
+ cmd->se_tfo->aborted_task(cmd);
+ /*
+ * To do: establish a unit attention condition on the I_T
+ * nexus associated with cmd. See also the paragraph "Aborting
+ * commands" in SAM.
+ */
+ if (transport_cmd_check_stop_to_fabric(cmd) == 0)
+ transport_put_cmd(cmd);
+ }
Why do we only have the call to transport_cmd_check_stop_to_fabric in
one of the branches here?
Hmm ... I see a transport_cmd_check_stop_to_fabric() call in both branches.
Maybe that means that I misunderstood your comment ?
I miswrote the comment, sorry. I mean the call to transport_put_cmd.
Hello Christoph,
In the "if" part the queue_status() function of the back-end driver is
called. That function must call transport_put_cmd() (indirectly) after
the response has been sent. Since in the "else" part no back-end driver
function is called that has to call transport_put_cmd() there is an
explicit call to that function.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html