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 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.


Hm yes. Before, the order was irrelevant because BlockBackend issued the drain first by restarting the tgm in blk_root_drained_begin.

Attachment: signature.asc
Description: PGP signature

Reply via email to