From: Fabian Grünbichler Date: Mon, 7 Mar 2016 11:39:28 +0000 (+0100) Subject: Decide whether volume is added as unused in subclass X-Git-Url: https://git.proxmox.com/?p=pve-container.git;a=commitdiff_plain;h=a8e9a4ead47a42c1108ebc055973778c5845d80c Decide whether volume is added as unused in subclass follow the change in PVE::AbstractConfig --- diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index ff8f7b3..ef0673c 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -121,10 +121,11 @@ sub __snapshot_delete_vmstate_file { } sub __snapshot_delete_vol_snapshot { - my ($class, $vmid, $ms, $mountpoint, $snapname) = @_; + my ($class, $vmid, $ms, $mountpoint, $snapname, $unused) = @_; my $storecfg = PVE::Storage::config(); PVE::Storage::volume_snapshot_delete($storecfg, $mountpoint->{volume}, $snapname); + push @$unused, $mountpoint->{volume}; } sub __snapshot_rollback_vol_possible { diff --git a/src/test/snapshot-expected/delete/lxc/105.conf b/src/test/snapshot-expected/delete/lxc/105.conf index b5a2837..c6d04c9 100644 --- a/src/test/snapshot-expected/delete/lxc/105.conf +++ b/src/test/snapshot-expected/delete/lxc/105.conf @@ -7,4 +7,3 @@ net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth ostype: redhat rootfs: local:snapshotable-disk-1 swap: 512 -unused0: local:unsnapshotable-disk-1