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: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH] block/iscsi: cancel libiscsi task when ABORT TASK TMF completes
Date: Tue, 20 Feb 2018 16:12:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Am 15.02.2018 um 18:27 schrieb Stefan Hajnoczi:
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.

Hi Stefan,

thanks for the clarification. I am fine with this change. I will check with 
Ronnie for the
libiscsi fix.

Peter





reply via email to

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