public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Stoiko Ivanov <s.ivanov@proxmox.com>
Subject: Re: [pve-devel] [PATCH container 1/1] sync_container_namespace: skip virtual filesystems
Date: Fri, 18 Sep 2020 12:07:02 +0200	[thread overview]
Message-ID: <ab48e32e-0417-8b66-3a1d-eadaa9bd2003@proxmox.com> (raw)
In-Reply-To: <20200917191701.2236-3-s.ivanov@proxmox.com>

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 <s.ivanov@proxmox.com>
> ---
>  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 $@;
>      }
> 





      reply	other threads:[~2020-09-18 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 19:16 [pve-devel] [PATCH common/container] fix syncfs usage for snapshot backup Stoiko Ivanov
2020-09-17 19:17 ` [pve-devel] [PATCH common 1/1] sync_mountpoint: open path so that sync works Stoiko Ivanov
2020-09-18 10:01   ` [pve-devel] applied: " Thomas Lamprecht
2020-09-17 19:17 ` [pve-devel] [PATCH container 1/1] sync_container_namespace: skip virtual filesystems Stoiko Ivanov
2020-09-18 10:07   ` Thomas Lamprecht [this message]

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=ab48e32e-0417-8b66-3a1d-eadaa9bd2003@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.ivanov@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