[pve-devel] [PATCH container] fix #4846: Avoid the outdated noacl mount option on ext4
Filip Schauer
f.schauer at proxmox.com
Fri Sep 1 11:05:53 CEST 2023
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>
---
src/PVE/LXC.pm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 1e9af0f..3ebce37 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1764,9 +1764,6 @@ sub __mountpoint_mount {
}
my $acl = $mountpoint->{acl};
- if (defined($acl)) {
- push @$optlist, ($acl ? 'acl' : 'noacl');
- }
my $optstring = join(',', @$optlist);
my $readonly = $mountpoint->{ro};
@@ -1787,6 +1784,13 @@ sub __mountpoint_mount {
$format = 'iso' if $vtype eq 'iso'; # allow to handle iso files
+ # Avoid the outdated 'noacl' mount option on ext4 file systems
+ if ($scfg->{type} ne 'zfspool') {
+ push @$optlist, 'acl' if $acl;
+ } elsif (defined($acl)) {
+ push @$optlist, ($acl ? 'acl' : 'noacl');
+ }
+
if ($format eq 'subvol') {
if ($mount_path) {
my (undef, $name) = PVE::Storage::parse_volname($storage_cfg, $volid);
--
2.39.2
More information about the pve-devel
mailing list