aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blockdev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c
index 862aa1b9aa..57ee41b73e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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;
}