[pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4

Filip Schauer f.schauer at proxmox.com
Wed Apr 17 16:35:53 CEST 2024


Do not use the 'noacl' mount option when mounting a container disk with
an ext4 file system. The option was removed from the kernel in commit
2d544ec923db

Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
---
Changes since v3:
* Simplify ext4 detection
* Do not add noacl if $acl is undefined

 src/PVE/LXC.pm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index e688ea6..394ffb8 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1825,8 +1825,20 @@ sub __mountpoint_mount {
     }
 
     my $acl = $mountpoint->{acl};
-    if (defined($acl)) {
-	push @$optlist, ($acl ? 'acl' : 'noacl');
+
+    if ($acl) {
+	push @$optlist, 'acl';
+    } elsif (defined($acl)) {
+	my $noacl = 1;
+
+	if ($storage) {
+	    my (undef, undef, undef, undef, undef, undef, $format) =
+		PVE::Storage::parse_volname($storage_cfg, $volid);
+
+	    $noacl = 0 if $format eq 'raw';
+	}
+
+	push @$optlist, 'noacl' if $noacl;
     }
 
     my $optstring = join(',', @$optlist);
-- 
2.39.2





More information about the pve-devel mailing list