qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block/iscsi: cancel libiscsi task when ABORT TA


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block/iscsi: cancel libiscsi task when ABORT TASK TMF completes
Date: Thu, 15 Feb 2018 17:27:14 +0000
User-agent: Mutt/1.9.2 (2017-12-15)

On Thu, Feb 15, 2018 at 03:24:54PM +0100, Peter Lieven wrote:
> Am 15.02.2018 um 12:15 schrieb Stefan Hajnoczi:
> > The libiscsi 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
> > 
> > The libiscsi implementation does not fulfil this promise.  The task's
> > callback is not invoked and its struct iscsi_pdu remains in the internal
> > list (effectively leaked).
> 
> If that contract is fixed in libiscsi, will the Qemu iSCSI driver still work?

In

+    /* If the command callback hasn't been called yet, drop the task */
+    if (!acb->bh) {

and

+    if (status == SCSI_STATUS_CANCELLED) {
+        if (!acb->bh) {

we're mindful of the fact that the callback may have been invoked by
libiscsi already.  There is no risk of double-completion.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]