]> git.proxmox.com Git - pve-container.git/commitdiff
fix #1897: bump MAX_MOUNT_POINTS to 256
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 5 Sep 2018 09:37:09 +0000 (11:37 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Sep 2018 05:53:28 +0000 (07:53 +0200)
and filter list of possible mountpoint names by currently used ones
before iterating instead of in the loop body.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/LXC/Config.pm

index d49b67427f1c064616f942f1dceec4d6b8400c58..7c10f4dea5fb425a6940921a191d5898cb269c45 100644 (file)
@@ -16,7 +16,7 @@ my $lock_handles =  {};
 my $lockdir = "/run/lock/lxc";
 mkdir $lockdir;
 mkdir "/etc/pve/nodes/$nodename/lxc";
-my $MAX_MOUNT_POINTS = 10;
+my $MAX_MOUNT_POINTS = 256;
 my $MAX_UNUSED_DISKS = $MAX_MOUNT_POINTS;
 
 # BEGIN implemented abstract methods from PVE::AbstractConfig
@@ -1268,9 +1268,9 @@ sub mountpoint_names {
 sub foreach_mountpoint_full {
     my ($class, $conf, $reverse, $func, @param) = @_;
 
-    foreach my $key ($class->mountpoint_names($reverse)) {
+    my $mps = [ grep { defined($conf->{$_}) } $class->mountpoint_names($reverse) ];
+    foreach my $key (@$mps) {
        my $value = $conf->{$key};
-       next if !defined($value);
        my $mountpoint = $key eq 'rootfs' ? $class->parse_ct_rootfs($value, 1) : $class->parse_ct_mountpoint($value, 1);
        next if !defined($mountpoint);