qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Peter Lieven <pl@kamp.de>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Felipe Franciosi <felipe@nutanix.com>
Subject: Re: [Qemu-devel] [PATCH] block/iscsi: cancel libiscsi task when ABORT TASK TMF completes
Date: Tue, 20 Feb 2018 17:59:06 +0000	[thread overview]
Message-ID: <CAJSP0QXy18dcfWNK7-oWucYv1TNpVnNDB=E55b6KcTx58HjJCg@mail.gmail.com> (raw)
In-Reply-To: <0f7b3bc8-544f-ac52-9486-5a9b697ef2a3@kamp.de>

On Tue, Feb 20, 2018 at 3:12 PM, Peter Lieven <pl@kamp.de> wrote:
> 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.

Great, then this patch can go via Paolo's SCSI tree.

Stefan

      reply	other threads:[~2018-02-20 17:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 11:15 [Qemu-devel] [PATCH] block/iscsi: cancel libiscsi task when ABORT TASK TMF completes Stefan Hajnoczi
2018-02-15 14:24 ` Peter Lieven
2018-02-15 17:27   ` Stefan Hajnoczi
2018-02-20 15:12     ` Peter Lieven
2018-02-20 17:59       ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJSP0QXy18dcfWNK7-oWucYv1TNpVnNDB=E55b6KcTx58HjJCg@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=felipe@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).