Re: [PATCH] VFS: Suppress automount on [l]stat, [l]getxattr, etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 26, 2011 at 4:09 PM, Trond Myklebust
<Trond.Myklebust@xxxxxxxxxx> wrote:
>
> I assume that means that we can get rid of LOOKUP_NO_AUTOMOUNT, and just
> replace the convoluted logic in follow_automount() with a test for
> LOOKUP_AUTOMOUNT? If we have agreed on a default behaviour, then that
> would seem cleaner than enumerating all these exceptions.

I do think that LOOKUP_NO_AUTOMOUNT is bogus.  It's not a
kernel-internal flag, it's for that silly "vfs_fstatat()" interface,
that was designed when LOOKUP_FOLLOW would cause an automount.

Now that LOOKUP_FOLLOW doesn't do that, the whole reason for
LOOKUP_NO_AUTOMOUNT really goes away, but then we have that crazy user
interface that was encoded for it (only for the very special vfs

The question then becomes: should we just ignore (and deprecate) that
crazy AT_NO_AUTOMOUNT flag? I say "yup".

Or should we do something *really* crazy, and say "if you *don't* have
AT_SYMLINK_NOFOLLOW *and* you don't have AT_NO_AUTOMOUNT, then we make
fstatat64() follow automounts, even though no sane version of *stat()
does so any more"?

Quite frankly, that just sounds insane. But we could do it, and it
would approximate the old semantics for that system call. Even if
those old semantics were clearly not very good, and the whole point of
AT_NO_AUTOMOUNT was to work around problems people must have had..

So my gut feel is that we should just ignore it for now.
AT_NO_AUTOMOUNT becomes a no-op, and the LOOKUP_NO_AUTOMOUNT flag is
already effectively one (since nothing but vfs_fstatat sets it, and
vfs_fstatat now doesn't follow automounts *anyway*)

The "let's just see if anybody complains when we clean stuff up"
approach, in other words.  Because I bet any user who doesn't have
AT_NO_AUTOMOUNT isn't because they didn't really want an automount,
it's because they weren't even aware of the issue.

                        Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux