From: "sochin.jiang" <sochin.jiang@huawei.com>
To: kwolf@redhat.com, mreitz@redhat.com
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
sochin.jiang@huawei.com, eric.fangyi@huawei.com,
subo7@huawei.com, xieyingtai@huawei.com, lina.lulina@huawei.com,
zhangshuai13@huawei.com, lizhengui@huawei.com
Subject: [Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring.
Date: Mon, 26 Jun 2017 19:04:24 +0800 [thread overview]
Message-ID: <1498475064-39816-1-git-send-email-sochin.jiang@huawei.com> (raw)
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
next reply other threads:[~2017-06-26 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 11:04 sochin.jiang [this message]
2017-06-28 22:33 ` [Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring Max Reitz
2017-06-29 1:12 ` sochin.jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498475064-39816-1-git-send-email-sochin.jiang@huawei.com \
--to=sochin.jiang@huawei.com \
--cc=eric.fangyi@huawei.com \
--cc=kwolf@redhat.com \
--cc=lina.lulina@huawei.com \
--cc=lizhengui@huawei.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=subo7@huawei.com \
--cc=xieyingtai@huawei.com \
--cc=zhangshuai13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).