On Wed, 2003-02-19 at 19:26, Ion Badulescu wrote:
> > On Wed, 2003-02-19 at 10:16, H. Peter Anvin wrote:
> > > Ion Badulescu wrote:
> > > > Isn't autofs v4 supposed to fix this? I remember Jeremy mentioning that
> > > > the filesystem would lock all accesses to a dentry scheduled to be 
> > > > unmounted until the daemon replied to the request.
> > > > 
> > > 
> > > That's fine and dandy, but you would have to atomically lock *all* 
> > > dentries belonging to the subtree, which I suspect (but don't know for 
> > > sure) is impossible.
> > 
> > I seem to have missed the rest of this thread.  What's the context?
> 
> HPA was saying that autofs checks if a filesystem is busy before trying to
> unmount it, but does not lock it, so that a remount request could come in
> while umount is still running.

Autofs4 addresses this in two ways.

For the actual busyness check, it holds the dcache lock while traversing
the dentries, so that shouldn't change during the check.  It also blocks
new name traversals while it is doing an expiry check, so once it has
decided a tree is not busy, and gets the daemon to do the umount, new
users are blocked until the umount is finished.  Once the umount is
done, the new users will trigger a new mount.

        J

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

Reply via email to