On Fri, 08/03 19:08, Paolo Bonzini wrote:
> On 03/08/2018 17:49, Fam Zheng wrote:
> > void aio_notify_accept(AioContext *ctx)
> > {
> > -if (atomic_xchg(&ctx->notified, false)) {
> > +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may
> > need the
> > + * ctx->notifie
On 03/08/2018 17:49, Fam Zheng wrote:
> void aio_notify_accept(AioContext *ctx)
> {
> -if (atomic_xchg(&ctx->notified, false)) {
> +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may need
> the
> + * ctx->notifier event to wake up, so don't already clear it just
> be
On 03/08/2018 17:49, Fam Zheng wrote:
> void aio_notify_accept(AioContext *ctx)
> {
> -if (atomic_xchg(&ctx->notified, false)) {
> +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may need
> the
> + * ctx->notifier event to wake up, so don't already clear it just
> be
>From main loop, bdrv_set_aio_context() can call IOThread's aio_poll().
That breaks aio_notify() because the ctx->notifier event can get cleared
too early by this which causes IOThread hanging.
See https://bugzilla.redhat.com/show_bug.cgi?id=1562750 for details.
Signed-off-by: Fam Zheng
---
uti