diff options
Diffstat (limited to 'block/mirror.c')
-rw-r--r-- | block/mirror.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/block/mirror.c b/block/mirror.c index 869212daac..8497e0db83 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -503,6 +503,7 @@ static void mirror_exit(BlockJob *job, void *opaque) BlockDriverState *src = s->source; BlockDriverState *target_bs = blk_bs(s->target); BlockDriverState *mirror_top_bs = s->mirror_top_bs; + Error *local_err = NULL; /* Make sure that the source BDS doesn't go away before we called * block_job_completed(). */ @@ -516,7 +517,11 @@ static void mirror_exit(BlockJob *job, void *opaque) if (s->backing_mode == MIRROR_SOURCE_BACKING_CHAIN) { BlockDriverState *backing = s->is_none_mode ? src : s->base; if (backing_bs(target_bs) != backing) { - bdrv_set_backing_hd(target_bs, backing); + bdrv_set_backing_hd(target_bs, backing, &local_err); + if (local_err) { + error_report_err(local_err); + data->ret = -EPERM; + } } } |