On Tue, 01/24 13:15, Paolo Bonzini wrote: > > > On 24/01/2017 13:04, Fam Zheng wrote: > > > > All in all I think we should skip external handlers regardless of > > aio_disable_external(), or even skip try_poll_mode, in nested aio_poll()'s. > > The > > reasons are 1) many nested aio_poll()'s don't have bdrv_drained_begin, so > > this > > check is not sufficient [...] bdrv_flush() > > spin longer than necessary, if not forever, when the guest keeps submitting > > more > > requests with ioeventfd. > > > I'm not sure I understand why this is related. aio_poll() only tries > poll mode once, so bdrv_flush would only spin until the fsync is complete.
Right, I was confused. The problematic ones are "drain" style ones that tracks a inflight counter. The only suspecious one is in v9fs_reset(), otherwise we are safe! Fam