From: Oguz Bektas Date: Mon, 14 Oct 2019 08:28:48 +0000 (+0200) Subject: allow to check for in-use volumes in pending section X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d063af008e6f72405dc9d471aeee03989d90ec33;p=pve-container.git allow to check for in-use volumes in pending section Signed-off-by: Oguz Bektas --- diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 91c1d81..66d72db 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -1326,9 +1326,10 @@ sub is_volume_in_use_by_snapshots { } sub is_volume_in_use { - my ($class, $config, $volid, $include_snapshots) = @_; + my ($class, $config, $volid, $include_snapshots, $include_pending) = @_; return 1 if $__is_volume_in_use->($class, $config, $volid); return 1 if $include_snapshots && $class->is_volume_in_use_by_snapshots($config, $volid); + return 1 if $include_pending && $__is_volume_in_use->($class, $config->{pending}, $volid); return 0; }