On Fri, 10/23 16:24, Stefan Hajnoczi wrote:
> On Fri, Oct 23, 2015 at 11:08:09AM +0800, Fam Zheng wrote:
> > +/**
> > + * bdrv_drained_begin:
> > + *
> > + * Begin a quiesced section for exclusive access to the BDS, by disabling
> > + * external request sources including NBD server and device
On Fri, Oct 23, 2015 at 11:08:09AM +0800, Fam Zheng wrote:
> +void bdrv_drained_begin(BlockDriverState *bs)
> +{
> +if (!bs->quiesce_counter++) {
> +aio_disable_external(bdrv_get_aio_context(bs));
> +}
> +bdrv_drain(bs);
> +}
> +
> +void bdrv_drained_end(BlockDriverState *bs)
>
On Fri, Oct 23, 2015 at 11:08:09AM +0800, Fam Zheng wrote:
> +/**
> + * bdrv_drained_begin:
> + *
> + * Begin a quiesced section for exclusive access to the BDS, by disabling
> + * external request sources including NBD server and device model. Note that
> + * this doesn't block timers or
The semantics is that after bdrv_drained_begin(bs), bs will not get new external
requests until the matching bdrv_drained_end(bs).
Signed-off-by: Fam Zheng
---
block/io.c| 17 +
include/block/block.h | 19 +++