On Wed, 2005-11-16 at 11:24, William H. Taber wrote:
> Jeff Moyer wrote:
> > ==> Regarding Re: [autofs] [RFC PATCH]autofs4: hang and proposed fix; Ram 
> > Pai <[EMAIL PROTECTED]> adds:
> 
> > 
> > I've been trying to reproduce this using sleeps in the user space daemon,
> > and I can't.  Can you post your test code so that I'm not guessing at
> > what's going on?  For example, one thing that's unclear is how you are
> > stuffing stubfs in between the vfs and autofs.
> > 
> > -Jeff
> > -
> The stubfs is just a test filesystem I wrote to reproduce this problem. 
>   It doesn't sit between the vfs and autofs.  What it does is to do a 
> lookup on /net and save the inode for it.  Then it gets the i_sem on 
> /net and calls lookup_one_len on a given hostname.  The second time in 
> it omits the lookup (it already has the inode for /net) and down on the 
> i_sem lock and then calls lookup_one_len. It has some of it's own 
> locking to get properly synchronized to force the race condition.  What 
> happens is that both processes are waiting on i_sem for /net.  The first 
> one gets it, and calls into the autofs which creates the new dentry, 
> starts the automount deamon, and waits for the mount to complete.  Since 
> the second lookup is already queued on the i_sem, it get's in second, 
> finds the dentry, calls revalidate which waits for the mount to complete 
> without releasing i_sem.  This of course prevents the automounter from 
> completing the mount.
> 
> Does this clarify?

here is the pointer to the patch that applies and compiles on
2.6.15-rc1.

http://www.sudhaa.com/~ram/readahead/stubfs.patch


you will have to set up /net/ram as the automounter location. 
That string is hardcoded. Maybe you can change that string to your
environment. And you can modify to it make it a module.

the instructions on how to reproduce is there in fs/stubfs/stub.c
line number 129 roughly.

This GPL code is for testing purpose only,
RP

> Will Taber

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to