* [pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4
@ 2024-04-17 14:35 Filip Schauer
2024-04-18 8:36 ` Fabian Grünbichler
2024-04-18 13:50 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Filip Schauer @ 2024-04-17 14:35 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4
2024-04-17 14:35 [pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4 Filip Schauer
@ 2024-04-18 8:36 ` Fabian Grünbichler
2024-04-18 13:50 ` [pve-devel] applied: " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2024-04-18 8:36 UTC (permalink / raw)
To: Proxmox VE development discussion
On April 17, 2024 4:35 pm, 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
>
> 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);
now we call this twice :-/ could we maybe just move this part into the
if below, where we already know about the format?
here we could push 'noacl' if $acl is defined but false, and $storage is
undef
and then below in the `if ($storage) {` branch once we have the format,
we can push '-o noacl' to @extra_opts if $acl is defined but false, and
$format is not 'raw'?
makes the patch smaller as well I'd say ;)
> +
> + $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
>
>
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied: [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4
2024-04-17 14:35 [pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4 Filip Schauer
2024-04-18 8:36 ` Fabian Grünbichler
@ 2024-04-18 13:50 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2024-04-18 13:50 UTC (permalink / raw)
To: Proxmox VE development discussion, Filip Schauer
Am 17/04/2024 um 16:35 schrieb Filip Schauer:
> 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(-)
>
>
applied, with some clean ups on top, making this shorter and covering
Fabians suggestions, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-18 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 14:35 [pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4 Filip Schauer
2024-04-18 8:36 ` Fabian Grünbichler
2024-04-18 13:50 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox