public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4
Date: Wed, 17 Apr 2024 16:35:53 +0200	[thread overview]
Message-ID: <20240417143553.150941-1-f.schauer@proxmox.com> (raw)

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


             reply	other threads:[~2024-04-17 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 14:35 Filip Schauer [this message]
2024-04-18  8:36 ` Fabian Grünbichler
2024-04-18 13:50 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240417143553.150941-1-f.schauer@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal