Re: [Qemu-devel] [PATCH 1/4] block: Use drained section in bdrv_set_aio_context

2016-03-16 Thread Fam Zheng
On Wed, 03/16 11:27, Paolo Bonzini wrote: > > > On 16/03/2016 11:10, Fam Zheng wrote: > > An empty begin/end pair is almost the same as a bare bdrv_drain except > > the aio_poll inside is wrapped by > > aio_disable_external/aio_enable_external. > > > > This is safer, and is the only way to achie

Re: [Qemu-devel] [PATCH 1/4] block: Use drained section in bdrv_set_aio_context

2016-03-16 Thread Paolo Bonzini
On 16/03/2016 11:10, Fam Zheng wrote: > An empty begin/end pair is almost the same as a bare bdrv_drain except > the aio_poll inside is wrapped by > aio_disable_external/aio_enable_external. > > This is safer, and is the only way to achieve quiescence in this > aio_poll(), because bdrv_drained_b

[Qemu-devel] [PATCH 1/4] block: Use drained section in bdrv_set_aio_context

2016-03-16 Thread Fam Zheng
An empty begin/end pair is almost the same as a bare bdrv_drain except the aio_poll inside is wrapped by aio_disable_external/aio_enable_external. This is safer, and is the only way to achieve quiescence in this aio_poll(), because bdrv_drained_begin/end pair cannot span across context detach/atta