* [pve-devel] [PATCH container] fix #5761: add the "discard" mount option
@ 2024-10-09 14:22 Filip Schauer
2024-10-24 11:46 ` Fiona Ebner
2024-10-24 14:49 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 4+ messages in thread
From: Filip Schauer @ 2024-10-09 14:22 UTC (permalink / raw)
To: pve-devel
Introduce the "discard" mount option for rootfs and mount points. This
ensures that unused container volume blocks are discarded from the
underlying storage backend when deleting files within the container.
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
src/PVE/LXC/Config.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index ce64c4c..e980f8a 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -311,7 +311,7 @@ sub __snapshot_rollback_get_unused {
cfs_register_file('/lxc/', \&parse_pct_config, \&write_pct_config);
-my $valid_mount_option_re = qr/(noatime|lazytime|nodev|nosuid|noexec)/;
+my $valid_mount_option_re = qr/(discard|lazytime|noatime|nodev|noexec|nosuid)/;
sub is_valid_mount_option {
my ($option) = @_;
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pve-devel] [PATCH container] fix #5761: add the "discard" mount option
2024-10-09 14:22 [pve-devel] [PATCH container] fix #5761: add the "discard" mount option Filip Schauer
@ 2024-10-24 11:46 ` Fiona Ebner
2024-10-24 14:49 ` [pve-devel] applied: " Thomas Lamprecht
1 sibling, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2024-10-24 11:46 UTC (permalink / raw)
To: Proxmox VE development discussion, Filip Schauer
Am 09.10.24 um 16:22 schrieb Filip Schauer:
> Introduce the "discard" mount option for rootfs and mount points. This
> ensures that unused container volume blocks are discarded from the
> underlying storage backend when deleting files within the container.
>
> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
However, this misses the UI part or you can get non-editable volumes there.
> ---
> src/PVE/LXC/Config.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
> index ce64c4c..e980f8a 100644
> --- a/src/PVE/LXC/Config.pm
> +++ b/src/PVE/LXC/Config.pm
> @@ -311,7 +311,7 @@ sub __snapshot_rollback_get_unused {
> cfs_register_file('/lxc/', \&parse_pct_config, \&write_pct_config);
>
>
> -my $valid_mount_option_re = qr/(noatime|lazytime|nodev|nosuid|noexec)/;
> +my $valid_mount_option_re = qr/(discard|lazytime|noatime|nodev|noexec|nosuid)/;
>
> sub is_valid_mount_option {
> my ($option) = @_;
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH container] fix #5761: add the "discard" mount option
2024-10-09 14:22 [pve-devel] [PATCH container] fix #5761: add the "discard" mount option Filip Schauer
2024-10-24 11:46 ` Fiona Ebner
@ 2024-10-24 14:49 ` Thomas Lamprecht
2024-10-28 11:25 ` Filip Schauer
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Lamprecht @ 2024-10-24 14:49 UTC (permalink / raw)
To: Proxmox VE development discussion, Filip Schauer
Am 09/10/2024 um 16:22 schrieb Filip Schauer:
> Introduce the "discard" mount option for rootfs and mount points. This
> ensures that unused container volume blocks are discarded from the
> underlying storage backend when deleting files within the container.
>
> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
> ---
> src/PVE/LXC/Config.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
please add UI integration like Fiona noticed
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-28 11:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-09 14:22 [pve-devel] [PATCH container] fix #5761: add the "discard" mount option Filip Schauer
2024-10-24 11:46 ` Fiona Ebner
2024-10-24 14:49 ` [pve-devel] applied: " Thomas Lamprecht
2024-10-28 11:25 ` Filip Schauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox