On Mon, Oct 17, 2016 at 10:04:59AM +0200, Paolo Bonzini wrote:
>
>
> On 16/10/2016 18:40, Stefan Hajnoczi wrote:
> > > void bdrv_wakeup(BlockDriverState *bs)
> > > {
> > > +if (bs->wakeup) {
> > > +aio_bh_schedule_oneshot(qemu_get_aio_context(), dummy_bh_cb,
> > > NULL);
> > > +
On 16/10/2016 18:40, Stefan Hajnoczi wrote:
> > void bdrv_wakeup(BlockDriverState *bs)
> > {
> > +if (bs->wakeup) {
> > +aio_bh_schedule_oneshot(qemu_get_aio_context(), dummy_bh_cb, NULL);
> > +}
> > }
>
> Why use a dummy BH instead of aio_notify()?
Originally I used aio_bh_s
On Thu, Oct 13, 2016 at 07:34:19PM +0200, Paolo Bonzini wrote:
> aio_poll is not thread safe; for example bdrv_drain can hang if
> the last in-flight I/O operation is completed in the I/O thread after
> the main thread has checked bs->in_flight.
>
> The bug remains latent as long as all of it is c
On Thu, 10/13 19:34, Paolo Bonzini wrote:
> diff --git a/include/block/block_int.h b/include/block/block_int.h
> index 11f877b..0516f62 100644
> --- a/include/block/block_int.h
> +++ b/include/block/block_int.h
> @@ -470,6 +470,7 @@ struct BlockDriverState {
> NotifierWithReturnList before_wri