From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 container] fix #4846: Avoid the outdated noacl mount option on ext4
Date: Thu, 11 Apr 2024 15:44:46 +0200 [thread overview]
Message-ID: <1712842611.s1gygot5w7.astroid@yuna.none> (raw)
In-Reply-To: <20240223104843.34281-1-f.schauer@proxmox.com>
On February 23, 2024 11:48 am, Filip Schauer wrote:
> 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
>
> The ext4 detection is based on $do_format in alloc_disk.
>
> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
> ---
> src/PVE/LXC.pm | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 7883cfb..6810601 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1835,8 +1835,26 @@ sub __mountpoint_mount {
> }
>
> my $acl = $mountpoint->{acl};
> - if (defined($acl)) {
> - push @$optlist, ($acl ? 'acl' : 'noacl');
> +
> + if ($acl) {
> + push @$optlist, 'acl';
> + } else {
> + my $noacl = 1;
> +
> + if ($storage) {
> + my $scfg = PVE::Storage::storage_config($storage_cfg, $storage);
> +
> + # Avoid the outdated 'noacl' mount option on ext4 file systems
> + if ($scfg->{content}->{rootdir} && $scfg->{path}) {
> + $noacl = ($scfg->{type} eq 'btrfs' && $scfg->{quotas});
I am not sure this is correct.. or rather, wouldn't it be simpler to say
if $storage && $format eq 'raw' => no noacl ?
if we get complains that somebody did something non-standard (i.e.,
manually formatted a raw volume using a different filesystem), we can
always think about adding support for that (e.g., via some "fs=XX"
property on the mountpoint that allows us to handle it here, although I
am not even sure if we *want* to support that ;)).
> + } elsif ($scfg->{type} eq 'zfspool') {
> + $noacl = 1;
> + } elsif ($scfg->{content}->{rootdir}) {
> + $noacl = 0;
> + }
> + }
> +
> + 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
>
>
>
next prev parent reply other threads:[~2024-04-11 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 10:48 Filip Schauer
2024-04-11 13:44 ` Fabian Grünbichler [this message]
2024-04-17 14:38 ` Filip Schauer
2024-04-18 8:17 ` Thomas Lamprecht
2024-04-18 8:48 ` Fabian Grünbichler
2024-04-18 9:22 ` 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=1712842611.s1gygot5w7.astroid@yuna.none \
--to=f.gruenbichler@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