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

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

 



> -----Original Message-----
> From: Linus Torvalds [mailto:torvalds@xxxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, September 22, 2011 6:57 PM
> To: Myklebust, Trond
> Cc: Jeff Layton; Ian Kent; David Howells; miklos@xxxxxxxxxx;
> viro@xxxxxxxxxxxxxxxxxx; gregkh@xxxxxxx; linux-nfs@xxxxxxxxxxxxxxx;
> leonardo.lists@xxxxxxxxx
> Subject: Re: [PATCH] VFS: Suppress automount on [l]stat, [l]getxattr,
etc.
> 
> On Thu, Sep 22, 2011 at 12:20 PM, Trond Myklebust
> <Trond.Myklebust@xxxxxxxxxx> wrote:
> >
> > We need to audit not only NFS, but a bunch of stuff in the VFS.
> 
> Why? What has *anything*else* got to do with fixing a NFSv4 bug?
> 
> IOW, why the hell would we hold up one bugfix just because you might
want
> to look at something else too?

Your LOOKUP_DIRECTORY solution assumes that any and all syscalls that
_might_ want to automount a directory that is the last path element can
always predict in advance that the last path element will be a
directory. I'm challenging that assumption.
So if I ask for quotactl(/foo), why am I suddenly required to know in
advance that /foo might be a directory, and so make that a /foo/ so that
the automounted case suddenly works?

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. As far as I'm concerned, if doesn't matter if you are
expecting a directory or not: with only a few exceptions, your
application is not supposed to be able to access the directory that will
be automounted over at all. The only reason for allowing the 'stat()'
exception is to optimize away the automount in the common case of an 'ls
-l' where the application doesn't care about accuracy.

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