diff --git a/block/mirror.c b/block/mirror.c index 429751b9fe..03fc6d63b7 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1056,6 +1056,10 @@ static int coroutine_fn bdrv_mirror_top_pwritev(BlockDriverState *bs, static int coroutine_fn bdrv_mirror_top_flush(BlockDriverState *bs) { + if (bs->backing == NULL) { + /* we can be here after failed bdrv_append in mirror_start_job */ + return 0; + } return bdrv_co_flush(bs->backing->bs); }