qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] mirror: hold aio_context before bdrv_drain
@ 2015-04-01  4:42 Bin Wu
  2015-04-01  8:19 ` Fam Zheng
  0 siblings, 1 reply; 5+ messages in thread
From: Bin Wu @ 2015-04-01  4:42 UTC (permalink / raw)
  To: qemu-devel, qemu-block, jcody, stefanha; +Cc: Bin Wu

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

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

end of thread, other threads:[~2015-04-02  0:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-01  4:42 [Qemu-devel] [PATCH] mirror: hold aio_context before bdrv_drain Bin Wu
2015-04-01  8:19 ` 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

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).