From: Fabian Grünbichler Date: Tue, 1 Mar 2016 08:14:29 +0000 (+0100) Subject: Don't apply snapshot config in snapshot_commit X-Git-Url: https://git.proxmox.com/?p=pve-container.git;a=commitdiff_plain;h=4d3d820192cc673cb7383757fab5d96efdb99c16 Don't apply snapshot config in snapshot_commit We hold a lock from snapshot_prepare until snapshot_commit, so there is no need to copy back the snapshot config to the actual config. This allows us to move snapshot_commit to the abstract common code base. --- diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index f5cc1f2..8e284c0 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1871,11 +1871,9 @@ sub snapshot_commit { delete $snap->{snapstate}; delete $conf->{lock}; - my $newconf = &$snapshot_apply_config($conf, $snap); + $conf->{parent} = $snapname; - $newconf->{parent} = $snapname; - - write_config($vmid, $newconf); + write_config($vmid, $conf); }; lock_config($vmid, $updatefn);