On 9/17/20 9:17 PM, Stoiko Ivanov wrote:
> skip additional virtual filesystems.
>
> the list is taken from a running debian container's /proc/mounts
>
> Signed-off-by: Stoiko Ivanov <[email protected]>
> ---
> src/PVE/LXC.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index b3e3581..b67d872 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1107,7 +1107,7 @@ my $do_syncfs = sub {
> my $mounts = PVE::ProcFSTools::parse_mounts($mountdata);
> foreach my $mp (@$mounts) {
> my ($what, $dir, $fs) = @$mp;
> - next if $fs eq 'fuse.lxcfs';
> + next if $fs =~
> /cgroup|devtmpfs|devpts|fuse.lxcfs|mqueue|fusectl|proc|sysfs|tmpfs/;
the comparison isn't exact any more, maybe add ^ and $ anchors, or use a hash.
We could also use the presence of "nodev" in `cat /proc/filesystems`, albeit zfs
may need to be parsed separate, all others are either ram backed (sync not
useful)
or really virtually computed once. Just as an idea...
> eval { PVE::Tools::sync_mountpoint($dir); };
> warn $@ if $@;
> }
>
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel