[pve-devel] [PATCH container] Don't apply snapshot config in snapshot_commit

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Mar 1 09:14:29 CET 2016


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.
---
Mirrors changes in QemuServer.pm.

 src/PVE/LXC.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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);
-- 
2.1.4





More information about the pve-devel mailing list