qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PULL 22/85] mirror: Fix inconsistent backing AioContext fo


From: Max Reitz
Subject: [Qemu-block] [PULL 22/85] mirror: Fix inconsistent backing AioContext for after mirroring
Date: Tue, 11 Jul 2017 18:07:11 +0200

From: "sochin.jiang" <address@hidden>

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 <address@hidden>
Message-id: address@hidden
[mreitz: Reworded commit message]
Signed-off-by: Max Reitz <address@hidden>
---
 block.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block.c b/block.c
index edfa6b7..b9e5114 100644
--- 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 */
-- 
2.9.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]