aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-06-10 15:05:32 +0300
committerKevin Wolf <kwolf@redhat.com>2021-06-29 16:51:00 +0200
commitbfae052a57d20af91b2fd9fb92469be6283f4820 (patch)
tree004745f0b6fa79d78e9dff4b48d11d87f54715ed /block.c
parentfd26b8a089962fa7ac1cbd44e138fbef4b484271 (diff)
downloadqemu-bfae052a57d20af91b2fd9fb92469be6283f4820.zip
qemu-bfae052a57d20af91b2fd9fb92469be6283f4820.tar.gz
qemu-bfae052a57d20af91b2fd9fb92469be6283f4820.tar.bz2
block: bdrv_reopen_parse_backing(): don't check frozen child
bdrv_set_backing_noperm() takes care of it (actual check is in bdrv_set_file_or_backing_noperm()), so we don't need to check it here. While being here, improve error message a bit. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210610120537.196183-5-vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/block.c b/block.c
index 69dc9d1..6472866 100644
--- a/block.c
+++ b/block.c
@@ -4308,19 +4308,7 @@ static int bdrv_reopen_parse_backing(BDRVReopenState *reopen_state,
"an implicit backing file", bs->node_name);
return -EPERM;
}
- /*
- * Check if the backing link that we want to replace is frozen.
- * Note that
- * bdrv_filter_or_cow_child(overlay_bs) == overlay_bs->backing,
- * because we know that overlay_bs == bs, and that @bs
- * either is a filter that uses ->backing or a COW format BDS
- * with bs->drv->supports_backing == true.
- */
- if (bdrv_is_backing_chain_frozen(overlay_bs,
- child_bs(overlay_bs->backing), errp))
- {
- return -EPERM;
- }
+
reopen_state->replace_backing_bs = true;
reopen_state->old_backing_bs = bs->backing ? bs->backing->bs : NULL;
ret = bdrv_set_backing_noperm(bs, new_backing_bs, set_backings_tran,