From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
qemu-block@nongnu.org, Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry
Date: Wed, 23 Aug 2017 18:15:35 +0200 [thread overview]
Message-ID: <1c4ee8ba-c179-0a8c-0fe3-ffa1be38e0a5@redhat.com> (raw)
In-Reply-To: <20170823144553.GE16760@stefanha-x1.localdomain>
On 23/08/2017 16:45, Stefan Hajnoczi wrote:
> That depends on the BDRV_POLL_WHILE() allowing all request coroutines to
> terminate before we call nbd_client_detach_aio_context():
>
> qio_channel_shutdown(client->ioc,
> QIO_CHANNEL_SHUTDOWN_BOTH,
> NULL);
> BDRV_POLL_WHILE(bs, client->read_reply_co);
>
> nbd_client_detach_aio_context(bs);
>
> I'm not sure we have any guarantee that request coroutines will have
> terminated.
Ok, I see my confusion, it's only because of the "receiving" flag which
actually means "waiting for reply". Your patch is okay.
Paolo
> Once nbd_client_detach_aio_context() is called
> ioc->read_coroutine/write_coroutine are set to NULL. At that point any
> remaining coroutine doing I/O on ioc will be in trouble.
next prev parent reply other threads:[~2017-08-23 16:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 12:51 [Qemu-devel] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry Stefan Hajnoczi
2017-08-22 13:23 ` Paolo Bonzini
2017-08-23 14:45 ` Stefan Hajnoczi
2017-08-23 16:15 ` Paolo Bonzini [this message]
2017-08-22 16:18 ` Dr. David Alan Gilbert
2017-08-23 14:20 ` Eric Blake
2017-08-23 14:26 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-23 14:51 ` [Qemu-devel] " Eric Blake
2017-08-23 16:17 ` Paolo Bonzini
2017-08-23 15:31 ` Vladimir Sementsov-Ogievskiy
2017-08-23 15:45 ` Eric Blake
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=1c4ee8ba-c179-0a8c-0fe3-ffa1be38e0a5@redhat.com \
--to=pbonzini@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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).