5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-10 01:18:01 +03:00

snapshot_delete: reorder parent "connection" after prepare

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
This commit is contained in:
Stefan Priebe 2014-07-04 10:25:49 +02:00 committed by Dietmar Maurer
parent 64ff6fe44c
commit 8fd882a42b

View File

@ -4935,10 +4935,12 @@ sub snapshot_delete {
die "snapshot '$snapname' does not exist\n" if !defined($snap);
# remove parent refs
&$unlink_parent($conf, $snap->{parent});
foreach my $sn (keys %{$conf->{snapshots}}) {
next if $sn eq $snapname;
&$unlink_parent($conf->{snapshots}->{$sn}, $snap->{parent});
if (!$prepare) {
&$unlink_parent($conf, $snap->{parent});
foreach my $sn (keys %{$conf->{snapshots}}) {
next if $sn eq $snapname;
&$unlink_parent($conf->{snapshots}->{$sn}, $snap->{parent});
}
}
if ($remove_drive) {