On Thu, 18 Mar 2004, Ian Kent wrote:
> One consequence of this is that when cd'ing to a directory we will have to 
> trigger the mount. To do it any other way will mean, essentially, 
> rewriting autofs4 from the ground up....

Am I missing something here?  If your process "cd"s to a directory, you
aren't changing to the mount point, you're changing to the referent.  That
is only allowed if you have X permission, and the only way the local kernel
can know that is to first mount the referent, and subsequently stat the
mount-root.

So it doesn't bother me that "cd" triggers mounting, even though in 0.1% of
the cases the process might "cd" elsewhere immediately without looking at
any files within the mount-root.  In most cases the very next system call
will be either to list the directory content or to open a file already
known to be in that directory, using a relative path.  So the mount is
hardly ever wasted.

I wonder if "cd"ing to the mount point, then mounting something over it, 
might trigger subtle bugs.  Example: the (nonexistent) content of the mount 
point dir is cached, and when you enumerate the directory you get the 
cached nothingness rather than the content of the referent, which you 
aren't even "cd"d to.   Hmmm, does this sound familiar?

James F. Carter          Voice 310 825 2897    FAX 310 206 6673
UCLA-Mathnet;  6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA  90095-1555
Email: [EMAIL PROTECTED]    http://www.math.ucla.edu/~jimc (q.v. for PGP key)

_______________________________________________
autofs mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to