Re: [Qemu-devel] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 03:26:32PM +0100, Stefan Hajnoczi wrote: On Wed, Sep 20, 2017 at 01:23:09PM +0300, Manos Pitsidianakis wrote: @@ -188,7 +194,7 @@ static bool bdrv_drain_recurse(BlockDriverState *bs) waited = BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0); /* Ensure any p

Re: [Qemu-devel] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Stefan Hajnoczi
On Wed, Sep 20, 2017 at 01:23:09PM +0300, Manos Pitsidianakis wrote: > @@ -188,7 +194,7 @@ static bool bdrv_drain_recurse(BlockDriverState *bs) > waited = BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0); > > /* Ensure any pending metadata writes are submitted to bs->file. */ > -

Re: [Qemu-devel] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Stefan Hajnoczi
On Wed, Sep 20, 2017 at 01:23:09PM +0300, Manos Pitsidianakis wrote: > diff --git a/include/block/block_int.h b/include/block/block_int.h > index ba4c383393..ea1326e3c7 100644 > --- a/include/block/block_int.h > +++ b/include/block/block_int.h > @@ -359,6 +359,8 @@ struct BlockDriver { > */ >

[Qemu-devel] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis --- in