mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-31 21:30:38 -07:00
blockdev: Use CAF in external_snapshot_prepare()
This allows us to differentiate between filters and nodes with COW backing files: Filters cannot be used as overlays at all (for this function). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
07cd7b659a
commit
7cc734a9ea
1 changed files with 6 additions and 1 deletions
|
|
@ -1562,7 +1562,12 @@ static void external_snapshot_prepare(BlkActionState *common,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (state->new_bs->backing != NULL) {
|
||||
if (state->new_bs->drv->is_filter) {
|
||||
error_setg(errp, "Filters cannot be used as overlays");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (bdrv_cow_child(state->new_bs)) {
|
||||
error_setg(errp, "The overlay already has a backing image");
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue