]> Git Repo - qemu.git/commitdiff
mirror: Fix inconsistent backing AioContext for after mirroring
authorsochin.jiang <[email protected]>
Mon, 26 Jun 2017 11:04:24 +0000 (19:04 +0800)
committerMax Reitz <[email protected]>
Tue, 11 Jul 2017 15:44:57 +0000 (17:44 +0200)
mirror_complete opens the backing chain, which should have the same
AioContext as the top when using iothreads. Make the code guarantee
this, which fixes a failed assertion in bdrv_attach_child.

Signed-off-by: sochin.jiang <[email protected]>
Message-id: 1498475064[email protected]
[mreitz: Reworded commit message]
Signed-off-by: Max Reitz <[email protected]>
block.c

diff --git a/block.c b/block.c
index edfa6b7a2cdee7dc929062606de9b6bfb9449cda..b9e5114a27789ed300d466ddb5224a26dadc0bac 100644 (file)
--- a/block.c
+++ b/block.c
@@ -2185,6 +2185,7 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
         ret = -EINVAL;
         goto free_exit;
     }
+    bdrv_set_aio_context(backing_hd, bdrv_get_aio_context(bs));
 
     /* Hook up the backing file link; drop our reference, bs owns the
      * backing_hd reference now */
This page took 0.032754 seconds and 4 git commands to generate.