Re: [Qemu-block] [PATCH v2] block: make BDRV_POLL_WHILE() re-entrancy safe

2018-03-12 Thread Stefan Hajnoczi
On Wed, Mar 07, 2018 at 12:46:19PM +, 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. > >

[Qemu-block] [PATCH v2] block: make BDRV_POLL_WHILE() re-entrancy safe

2018-03-07 Thread Stefan Hajnoczi
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