[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield()
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry |
Date: |
Wed, 23 Aug 2017 18:15:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
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.
- [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry, Stefan Hajnoczi, 2017/08/22
- Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry, Paolo Bonzini, 2017/08/22
- Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry, Dr. David Alan Gilbert, 2017/08/22
- Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry, Eric Blake, 2017/08/23
- Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry, Eric Blake, 2017/08/23
- Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry, Eric Blake, 2017/08/23