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. */
- bdrv_drain_invoke(bs);
+ bdrv_drain_invoke(bs, begin);
Do you need to move bdrv_drain_invoke(bs, begin) before
BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0)?
This will ensure that throttling is disabled and the TGM restarted
before we wait for requests to complete.