aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blockdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c
index 34f6e5bbb0..0c6c2a7845 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1579,8 +1579,9 @@ static void external_snapshot_prepare(BlkTransactionState *common,
return;
}
- if (has_snapshot_node_name && bdrv_find_node(snapshot_node_name)) {
- error_setg(errp, "New snapshot node name already existing");
+ if (has_snapshot_node_name &&
+ bdrv_lookup_bs(snapshot_node_name, snapshot_node_name, NULL)) {
+ error_setg(errp, "New snapshot node name already in use");
return;
}