All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Myklebust, Trond" <Trond.Myklebust@netapp.com>,
	Jeff Layton <jlayton@redhat.com>,
	David Howells <dhowells@redhat.com>,
	miklos@szeredi.hu, viro@zeniv.linux.org.uk, gregkh@suse.de,
	linux-nfs@vger.kernel.org, leonardo.lists@gmail.com
Subject: Re: [PATCH] VFS: Suppress automount on [l]stat, [l]getxattr, etc.
Date: Fri, 23 Sep 2011 11:15:58 +0800	[thread overview]
Message-ID: <1316747758.3346.89.camel@perseus.themaw.net> (raw)
In-Reply-To: <CA+55aFx9XbKV7xNR-Vs7NhyDE=vmX7Zr=U2YB=omvcae_ye9XQ@mail.gmail.com>

On Thu, 2011-09-22 at 18:04 -0700, Linus Torvalds wrote:
> On Thu, Sep 22, 2011 at 5:56 PM, Myklebust, Trond
> <Trond.Myklebust@netapp.com> wrote:
> >
> > Your assumption is that in the majority of cases, we do _not_ want to
> > automount the final directory unless we know that we are expecting a
> > directory.
> 
> Umm. That is the assumption yes, BUT THAT IS ALSO THE CURRENT STATE.

With the patch that Miklos posted, yes.

But the other users of the vfs-automount didn't behave this way before
the vfs-automount changes.

> 
> So it's more than an assumption. It's a fact.

For autofs itself, yes.

> 
> So when you call it "assumption", you are basically ignoring and
> trying to belittle current reality. Why?

Lets take a step back and re-examine what started this.

That is the semantic change automounting LOOKUP_FOLLOW path walks, aka.
stat and related system calls which Miklos wanted to change back.

Unfortunately, the reality is that most of the time (almost always
anyway) that is what should be done. The exceptions are such things as
long listing directory contents where we would also like stat to cause
automounting but cannot because it causes users to complain about lots
of mounts being triggered. Contrast that with the behavior of find(1)
where users sometimes don't want a bunch of mounts done but, in this
case, they must be done for it to function.

So the previous autofs behavior was problematic for find and couldn't be
fixed, but was OK for long directory listings. Pretty much a crap
situation.

There is also the common case where applications perform a stat(2) (or
any LOOKUP_FOLLOW type) call (other than when used in listing a
directory) where the automount should also be done and complains about
that behavior were met with an explanation of why it was so and a
wontfix response. So for the bulk of cases automounting should be done
for LOOKUP_FOLLOW type system calls and not for the ~LOOKUP_FOLLOW.
Which is also a "natural" usage because user space largely does this the
way automounting needs already.

Coming back to the bug that Miklos referred to.

This was a case where long listing a directory caused automount child
directories to be mounted. But for directory listings we want don't want
to automount it's child directories. We also want the details on
symlinks, and don't want to follow them. In the reported bug there were
a couple of lgetxattr(2) calls and suddenly a getxattr(2) call which was
inconsistent usage and was causing the unwanted mounts. Even upstream
conceded that this was inconsistent and accepted a path (well actually
two patches, one for the acl package and one for coreutils), and the
problem was gone.

In the time we have had this changed behavior we haven't had any further
reports of problems that I'm aware of. But there may be more to come, I
expect we will see some complains from GUI uses at some point too but
they will be a problem whether we mount on stat on not, since not
mounting the things they want to see is no good for them and mounting to
many things for them annoys them as well.

Now Trond has identified a number of examples that demonstrates why we
should not merge (or should revert) Miklos's patch, examples I couldn't
provide when he asked for them.

Again, I believe we got it right the first time, and we should work with
user space to provide any information and assistance needed for them to
change to accommodate the semantic difference which has been needed for
many years, and has (had) now been done.

So, sorry Miklos, but I now think your patch should be reverted.

Ian



  parent reply	other threads:[~2011-09-23  3:16 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 13:45 [PATCH] VFS: Suppress automount on [l]stat, [l]getxattr, etc David Howells
2011-09-22 14:33 ` Miklos Szeredi
2011-09-22 16:04 ` Ian Kent
2011-09-22 16:30   ` Linus Torvalds
2011-09-22 16:45     ` Ian Kent
2011-09-22 17:35       ` Jeff Layton
2011-09-22 18:44         ` Jeff Layton
2011-09-22 19:20           ` Trond Myklebust
2011-09-22 22:57             ` Linus Torvalds
2011-09-23  0:56               ` Myklebust, Trond
2011-09-23  1:04                 ` Linus Torvalds
2011-09-23  1:21                   ` Trond Myklebust
2011-09-23  7:25                     ` Miklos Szeredi
2011-09-23 10:57                       ` Ian Kent
2011-09-23  3:15                   ` Ian Kent [this message]
2011-09-23 10:33                   ` David Howells
2011-09-23 14:34                     ` Trond Myklebust
2011-09-23 14:46                       ` Linus Torvalds
2011-09-23 15:01                         ` Trond Myklebust
2011-09-23 15:15                           ` Linus Torvalds
2011-09-23 15:41                         ` Ian Kent
2011-09-23 16:19                           ` Miklos Szeredi
2011-09-23 16:21                           ` Linus Torvalds
2011-09-23 16:26                             ` Linus Torvalds
     [not found]                             ` <13920.1316796007@redhat.com! >
2011-09-23 16:54                               ` David Howells
2011-09-23 17:18                                 ` Linus Torvalds
2011-09-23 16:40                           ` David Howells
2011-09-23 16:47                             ` Linus Torvalds
2011-09-23 15:18                       ` David Howells
2011-09-23 16:10                         ` Miklos Szeredi
2011-09-24  1:30                           ` Ian Kent
2011-09-24  1:44                             ` Linus Torvalds
2011-09-24  2:31                               ` Ian Kent
2011-09-24 11:36                               ` Jeff Layton
2011-09-24 15:56                                 ` Linus Torvalds
2011-09-26  5:11                                   ` Ian Kent
2011-09-26 20:48                                     ` Linus Torvalds
2011-09-26 21:13                                       ` Trond Myklebust
2011-09-26 21:24                                         ` Linus Torvalds
2011-09-26 21:31                                           ` Trond Myklebust
2011-09-26 22:24                                             ` Linus Torvalds
2011-09-26 22:33                                               ` Trond Myklebust
2011-09-26 22:56                                                 ` Linus Torvalds
2011-09-26 23:09                                                   ` Trond Myklebust
2011-09-26 23:26                                                     ` Linus Torvalds
2011-09-27  0:59                                                       ` Trond Myklebust
2011-09-27  1:18                                                         ` Linus Torvalds
2011-09-27  4:24                                                           ` Ian Kent
2011-09-27  3:57                                                         ` Linus Torvalds
2011-09-27  4:16                                                           ` Ian Kent
2011-09-27  4:35                                                             ` Linus Torvalds
2011-09-27  4:51                                                               ` Ian Kent
2011-09-27 14:32                                                                 ` Linus Torvalds
2011-09-27 15:11                                                                   ` Myklebust, Trond
2011-09-29  9:32                                                                   ` Ian Kent
2011-09-27 15:22                                                                 ` Linus Torvalds
2011-09-27 17:38                                                                   ` Greg KH
2011-09-27 17:51                                                                     ` Linus Torvalds
2011-09-27 18:00                                                                       ` Greg KH
2011-09-27 20:18                                                                         ` Miklos Szeredi
2011-09-27 22:38                                                                           ` Greg KH
2011-09-27 13:34                                                       ` [PATCH 1/2] VFS: Fix the remaining automounter semantics regressions Trond Myklebust
2011-09-27 13:34                                                         ` [PATCH 2/2] VFS: Document automounter semantics Trond Myklebust
2011-09-23 15:23                       ` [PATCH] VFS: Suppress automount on [l]stat, [l]getxattr, etc David Howells

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=1316747758.3346.89.camel@perseus.themaw.net \
    --to=raven@themaw.net \
    --cc=Trond.Myklebust@netapp.com \
    --cc=dhowells@redhat.com \
    --cc=gregkh@suse.de \
    --cc=jlayton@redhat.com \
    --cc=leonardo.lists@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.