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 > >