Re: [PATCH] vfs: automount should ignore LOOKUP_FOLLOW

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

 



Ian Kent <raven@xxxxxxxxxx> writes:

> On Tue, 2011-09-06 at 17:39 +0200, Miklos Szeredi wrote:
>> Ian Kent <raven@xxxxxxxxxx> writes:
>> 
>> > On Tue, 2011-09-06 at 10:09 +0200, Miklos Szeredi wrote:
>> >> Ian Kent <raven@xxxxxxxxxx> writes:
>> >> 
>> >> > On Mon, 2011-09-05 at 19:02 +0200, Miklos Szeredi wrote:
>> >> >> 
>> >> >> If automounting on lstat(2) is the correct behavior (is it?  why?)  then at
>> >> >> least it should be enabled by a global switch or mount option, IMO.
>> >> >
>> >> > Ideally we wouldn't need to take special precautions for these
>> >> > operations at all but we can't, especially for GUI environments that
>> >> > constantly scan file systems on mount/umount activity.
>> >> >
>> >> > Historically for autofs, neither stat(2) or lstat(2) would trigger a
>> >> > mount. With the current implementation stat(2) now does but lstat(2)
>> >> > doesn't which is a step in the right direction IMHO. So, I recommend we
>> >> > continue to encourage user space to make the needed changes so we
>> >> > continue to move in the right direction, and yes, I acknowledge it is a
>> >> > pain but it'll never get done otherwise.
>> >> 
>> >> I'm not quite convinced.  What's the advantage of triggering automount
>> >> on stat(2)?
>> >
>> > You get the information of the directory of the mounted fs and for many
>> > peoples purposes automounting should be transparent so that would be
>> > best.
>> 
>> The same is true for lstat(2).
>> 
>> >  
>> >> 
>> >> Has anybody complained that stat(2) on the mountpoint doesn't cause an
>> >> automount?
>> >
>> > Yes, based on the reasoning above.
>> 
>> Would any of those complaints go away if stat(2) did cause an
>> automount and lstat(2) didn't?
>
> Ummm .... please forgive me, I'm confused over which of these cause an
> automount to occur, again.
>
> Much of what I've said previously is wrong because stat(2) does cause
> the automount and lstat(2) doesn't, which is, I think, the way it should
> be, semantically (see bug
> https://bugzilla.redhat.com/show_bug.cgi?id=692823 for example).
>
> I'll go back and check the code "again", just to be doubly sure, which I
> need to do given my constant confusion on this, oops!

Sloppy wording on my part is probably responsible for some of the
confusion.

Yes, 2.6.38 and later kernels do trigger on stat(2) but not on lstat(2).

My question is this:  does this behavior improve anything compared to
kernels before 2.6.38?  Because I don't see that it does, in fact it's
just causing regressions.

You say it's a step in the right direction but I don't see why.  Either
we want stat *and* lstat to both be correct and trigger the automount or
we are satisfied with the incorrect but well established practice of not
triggering on (l)stat.

The middle ground makes no sense IMO, there's nothing gained by the
differentiated behavior based on LOOKUP_FOLLOW.

Can you explain why it's better if stat() tiggers automounts and gives a
correct result but lstat() doesn't?

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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux