From 19dd29e8a77cd820515de5289f566508e0ed4926 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 7 Apr 2017 14:54:11 +0800 Subject: mirror: Fix aio context of mirror_top_bs It should be moved to the same context as source, before inserting to the graph. Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/mirror.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/mirror.c b/block/mirror.c index 46ecd38ef0..164438f422 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1148,6 +1148,7 @@ static void mirror_start_job(const char *job_id, BlockDriverState *bs, return; } mirror_top_bs->total_sectors = bs->total_sectors; + bdrv_set_aio_context(mirror_top_bs, bdrv_get_aio_context(bs)); /* bdrv_append takes ownership of the mirror_top_bs reference, need to keep * it alive until block_job_create() succeeds even if bs has no parent. */ -- cgit v1.2.1