]> git.proxmox.com Git - pve-container.git/commitdiff
Don't apply snapshot config in snapshot_commit
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 1 Mar 2016 08:14:29 +0000 (09:14 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 1 Mar 2016 08:30:10 +0000 (09:30 +0100)
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.

src/PVE/LXC.pm

index f5cc1f26b3d626be80fe643a9573ac7f2d13cc92..8e284c0126232e122ed165bd24e97caf30c7a7b1 100644 (file)
@@ -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);