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

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

 



Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> writes:

> 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@xxxxxxxxxx> 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.
>> 
>> So it's more than an assumption. It's a fact.
>> 
>> So when you call it "assumption", you are basically ignoring and
>> trying to belittle current reality. Why?
>
> AFAICR, the whole point of doing the ->automount() stuff was to fix what
> was perceived to be a broken situation in which the application was more
> often than not seeing the properties of a directory which it would
> _never_ directly access.

We are pitting one set of applications against another.  There's no
Right(TM) behavior here.  In any case there will be applications which
will behave strangely, be extremely slow, etc...

Changing the behavior of stat will cause regressions.  Period.  If we
just fixed up those apps which behave badly with the old kernels, there
wouldn't be any regressions.

> David, Ian, Al and I carefully listed the cases where we might want to
> optimise away the automount, and designed a system that fit those cases.
>
> I fully accept that we need to address any regressions that may have
> introduced, but your fix goes beyond the regressions that were reported:
> it basically puts us back where we were before the automount changes. In
> that situation, what have we gained by the changes, and why keep them at
> all?

You are blowing this out of proportion.  Those patches do a lot more
than change the behavior of stat, etc.  The fact that stat will trigger
an automount is only mentioned in passing, and even there it's not
stated that the behavior was actually *changed* from the old autofs4
implentation:

   "I've also extracted the mount/don't-mount logic from autofs4 and
    included it here.  It makes the mount go ahead anyway if someone
    calls open() or creat(), tries to traverse the directory, tries to
    chdir/chroot/etc. into the directory, or sticks a '/' on the end of
    the pathname.  If they do a stat(), however, they'll only trigger
    the automount if they didn't also say O_NOFOLLOW."

Thanks,
Miklos
--
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