[pve-devel] [PATCH v3 container 16/19] allow to check for in-use volumes in pending section
Oguz Bektas
o.bektas at proxmox.com
Mon Oct 14 10:28:48 CEST 2019
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
src/PVE/LXC/Config.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index da5ef03..f73da1e 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;
}
--
2.20.1
More information about the pve-devel
mailing list