qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring.
@ 2017-06-26 11:04 sochin.jiang
  2017-06-28 22:33 ` Max Reitz
  0 siblings, 1 reply; 3+ messages in thread
From: sochin.jiang @ 2017-06-26 11:04 UTC (permalink / raw)
  To: kwolf, mreitz
  Cc: qemu-block, qemu-devel, sochin.jiang, eric.fangyi, subo7,
	xieyingtai, lina.lulina, zhangshuai13, lizhengui

From: "sochin.jiang" <sochin.jiang@huawei.com>

 mirror_complete opens the backings, BDSs of the new open backings should have a
 same AioContext with the top when using iothreads, fix the code to guarantee this,
 also avoiding unexpected qemu exit(assert fails in bdrv_attach_child).

Signed-off-by: sochin.jiang <sochin.jiang@huawei.com>
---
 block.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block.c b/block.c
index 6943962..b312fe6 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 */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-29  1:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 11:04 [Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring sochin.jiang
2017-06-28 22:33 ` Max Reitz
2017-06-29  1:12   ` sochin.jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).