linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Eric Sandeen <sandeen@sandeen.net>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfsprogs: ignore autofs mount table entries
Date: Wed, 07 Oct 2020 12:41:12 +0800	[thread overview]
Message-ID: <d338a54d247ec560d019aa9e9a7be4c8aa69db6d.camel@themaw.net> (raw)
In-Reply-To: <bb1c53a5-5f96-e1cb-502d-e8e4c1e2a9f3@sandeen.net>

On Fri, 2020-10-02 at 10:15 -0500, Eric Sandeen wrote:
> 
> On 10/1/20 9:27 PM, Ian Kent wrote:
> > > I'm mostly ok with just always and forever filtering out anything
> > > that matches
> > > "autofs" but if it's unnecessary (like the first case I think?)
> > > it
> > > may lead
> > > to confusion for future code readers.
> > I've got feedback from Darrick too, so let me think about what
> > should
> > be done.
> > 
> > What I want out of this is that autofs mounts don't get triggered
> > when
> > I start autofs for testing when xfs is the default (root) file
> > system.
> > If it isn't the default file system this behaviour mostly doesn't
> > happen.
> 
> Yep I'm totally on board with that plan in general, thanks.
> 
> I wouldn't worry about refactoring in service of the goal, I just
> wanted
> to be sure that we were being strategic/surgical about the changes.

Back to this ...

I wasn't thinking so much about strategic/surgical because those autofs
entries only add overhead, particularly if your loading the mounts and
traversing them later for such things as searching.

But looking around further it's platform_test_xfs_path() that does the
statfs() that causes mount triggering. It wants to know the fs type of
the passed in path so it has no choice but to call statfs().

It's called from various places originating from fs_table_initialise()
and one spot in xfs_fsr.c so excluding autofs mounts via the initialise
function is petty effective at getting rid of that extra overhead and
avoiding the platform_test_xfs_path() call.

I don't see a sensible way to eliminate this call from xfs_fsr but
reorganization isn't the sort of thing that udisksd (or others) would
have reason to call anyway so there's no real point in doing it.

So I think just dropping that first hunk, as you recommended, is the
right thing to do.

Ian
> 
> Thanks,
> -Eric
> 
> > My basic test setup has a couple of hundred direct autofs mounts in
> > two or three maps and they all get mounted when starting autofs.
> > 
> > I'm surprised we haven't had complaints about it TBH but people
> > might
> > not have noticed it since they expire away if they don't actually
> > get used.
> > 
> > Ian
> > 


  reply	other threads:[~2020-10-07  4:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  1:06 [PATCH] xfsprogs: ignore autofs mount table entries Ian Kent
2020-10-01 15:19 ` Darrick J. Wong
2020-10-02  2:55   ` Ian Kent
2020-10-01 21:22 ` Eric Sandeen
2020-10-02  2:27   ` Ian Kent
2020-10-02  4:40     ` Ian Kent
2020-10-08 20:02       ` Eric Sandeen
2020-10-09  0:55         ` Ian Kent
2020-10-02 15:15     ` Eric Sandeen
2020-10-07  4:41       ` Ian Kent [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-08  1:52 Ian Kent
2020-10-08  1:54 ` Ian Kent
2020-10-08 20:03 ` Eric Sandeen
2020-10-09  0:49   ` Ian Kent
2020-10-15  8:25 ` Christoph Hellwig

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=d338a54d247ec560d019aa9e9a7be4c8aa69db6d.camel@themaw.net \
    --to=raven@themaw.net \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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;
as well as URLs for NNTP newsgroup(s).