aboutsummaryrefslogtreecommitdiff
path: root/block/mirror.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-02-13 21:26:00 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-02-13 21:26:00 +0000
commit392b9a74b9b621c52d05e37bc6f41f1bbab5c6f8 (patch)
tree5ebb2029ff0a819448d9ad1309d1c5fb18e6881d /block/mirror.c
parentf4ceebdec531243dd72e38f85f085287e6e63258 (diff)
parent934aee14d36e67468260635af61c387227cdaf78 (diff)
Merge remote-tracking branch 'remotes/ericb/tags/pull-bitmaps-2021-02-12' into staging
bitmaps patches for 2021-02-12 - add 'transform' member to manipulate bitmaps across migration - work towards better error handling during bdrv_open # gpg: Signature made Fri 12 Feb 2021 23:19:39 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-bitmaps-2021-02-12: block: use return status of bdrv_append() block: return status from bdrv_append and friends qemu-iotests: 300: Add test case for modifying persistence of bitmap migration: dirty-bitmap: Allow control of bitmap persistence migration: dirty-bitmap: Use struct for alias map inner members Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/mirror.c')
-rw-r--r--block/mirror.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/mirror.c b/block/mirror.c
index 9faffe4707..1803c6988b 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1569,7 +1569,6 @@ static BlockJob *mirror_start_job(
BlockDriverState *mirror_top_bs;
bool target_is_backing;
uint64_t target_perms, target_shared_perms;
- Error *local_err = NULL;
int ret;
if (granularity == 0) {
@@ -1618,12 +1617,11 @@ static BlockJob *mirror_start_job(
* it alive until block_job_create() succeeds even if bs has no parent. */
bdrv_ref(mirror_top_bs);
bdrv_drained_begin(bs);
- bdrv_append(mirror_top_bs, bs, &local_err);
+ ret = bdrv_append(mirror_top_bs, bs, errp);
bdrv_drained_end(bs);
- if (local_err) {
+ if (ret < 0) {
bdrv_unref(mirror_top_bs);
- error_propagate(errp, local_err);
return NULL;
}