From: Bin Wu <wu.wubin@huawei.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org, jcody@redhat.com,
stefanha@redhat.com
Cc: Bin Wu <wu.wubin@huawei.com>
Subject: [Qemu-devel] [PATCH] mirror: hold aio_context before bdrv_drain
Date: Wed, 1 Apr 2015 12:42:21 +0800 [thread overview]
Message-ID: <1427863341-7156-1-git-send-email-wu.wubin@huawei.com> (raw)
From: Bin Wu <wu.wubin@huawei.com>
Signed-off-by: Bin Wu <wu.wubin@huawei.com>
---
block/mirror.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/mirror.c b/block/mirror.c
index 4056164..08372df 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -530,7 +530,9 @@ static void coroutine_fn mirror_run(void *opaque)
* mirror_populate runs.
*/
trace_mirror_before_drain(s, cnt);
+ aio_context_acquire(bdrv_get_aio_context(bs));
bdrv_drain(bs);
+ aio_context_release(bdrv_get_aio_context(bs));
cnt = bdrv_get_dirty_count(bs, s->dirty_bitmap);
}
--
1.7.12.4
next reply other threads:[~2015-04-01 4:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 4:42 Bin Wu [this message]
2015-04-01 8:19 ` [Qemu-devel] [PATCH] mirror: hold aio_context before bdrv_drain Fam Zheng
2015-04-01 8:49 ` Bin Wu
2015-04-01 11:59 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-02 0:40 ` Bin Wu
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=1427863341-7156-1-git-send-email-wu.wubin@huawei.com \
--to=wu.wubin@huawei.com \
--cc=jcody@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).