From: Fam Zheng Date: Fri, 7 Apr 2017 06:54:11 +0000 (+0800) Subject: mirror: Fix aio context of mirror_top_bs X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=19dd29e8a77cd820515de5289f566508e0ed4926;p=qemu.git 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 --- 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. */