qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] libiscsi task cancellation
@ 2018-02-08 14:08 Stefan Hajnoczi
  2018-02-08 14:14 ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2018-02-08 14:08 UTC (permalink / raw)
  To: ronnie sahlberg
  Cc: Felipe Franciosi, Peter Lieven, Paolo Bonzini, qemu-devel,
	Hannes Reinecke

SAM-5, 5.6 Aborting commands says:

  A command is aborted when a SCSI device condition (see 6.3), command,
  or task management function causes termination of the command prior to
  its completion by the device server. After a command is aborted and
  TASK ABORTED status, if any, is returned, the SCSI target device shall
  send no further requests or responses for that command.

Then "Table 48 — Task management functions that abort commands (part 1
of 2)" goes on to say that no TASK ABORTED status is returned for
aborted commands "if the ABORT TASK scope is I_T_L nexus".

My interpretation is that the target doesn't have to send a response
for the aborted command.  It just needs to complete the ABORT TASK
TMF.  Afterwards the initiator knows the task is gone and will receive
no more responses.

Is my understanding correct?

Now on to libiscsi:

The iscsi_task_mgmt_async() API documentation says:

  * abort_task will also cancel the scsi task. The callback for the
scsi task will be invoked with
  *            SCSI_STATUS_CANCELLED

I see that the ABORT TASK TMF response invokes the user's
iscsi_task_mgmt_async() callback but not the command callback.  I'm
not sure how the command callback is invoked with
SCSI_STATUS_CANCELLED unless libiscsi is relying on the target to send
that response.

Is libiscsi honoring its iscsi_task_mgmt_async() contract?

Thanks,
Stefan

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

end of thread, other threads:[~2018-02-14 16:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08 14:08 [Qemu-devel] libiscsi task cancellation Stefan Hajnoczi
2018-02-08 14:14 ` Paolo Bonzini
2018-02-08 14:58   ` Hannes Reinecke
2018-02-08 15:12     ` Stefan Hajnoczi
2018-02-08 15:33     ` Felipe Franciosi
2018-02-08 15:08   ` Stefan Hajnoczi
2018-02-08 15:13     ` Stefan Hajnoczi
2018-02-14 16:12     ` Felipe Franciosi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).