On Wed, Mar 07, 2018 at 12:46:19PM +0000, Stefan Hajnoczi wrote: > Nested BDRV_POLL_WHILE() calls can occur. Currently > assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens. > > This patch converts the bool wait_->need_kick flag to an unsigned > wait_->num_waiters counter. > > Nesting works correctly because outer AIO_WAIT_WHILE() callers evaluate > the condition again after the inner caller completes (invoking the inner > caller counts as aio_poll() progress). > > Reported-by: "fuweiwei (C)" <fuweiw...@huawei.com> > Cc: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > v2: > * Rebase onto qemu.git/master now that AIO_WAIT_WHILE() has landed > [Kevin] > > include/block/aio-wait.h | 61 > ++++++++++++++++++++++++------------------------ > util/aio-wait.c | 2 +- > 2 files changed, 31 insertions(+), 32 deletions(-)
Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan
signature.asc
Description: PGP signature