Re: [autofs] Re: umount() and NFS races in 2.4.26
From: Greg Banks
Date: Sat Jul 10 2004 - 10:28:50 EST
On Sat, Jul 10, 2004 at 02:57:46PM +0800, raven@xxxxxxxxxx wrote:
> On Thu, 8 Jul 2004, Thomas Moestl wrote:
> > I believe that I have found two problems:
> >
> > - The NFS async unlink code (fs/nfs/unlink.c) does keep a dentry for
> > later asynchronous processing, but the mount point is unbusied via
> > path_release() once sys_unlink() returns (fs/namei.c). [...]
This used to be a bug. It was fixed in 2.4.26 with
http://linux.bkbits.net:8080/linux-2.4/diffs/fs/nfs/dir.c@xxxx
What happens now is that the dentry and its inode are cleaned up
when the async unlink task is deleted in nfs_put_super() between
the first and second calls to invalidate_inodes() in kill_super().
> > - There is a SMP race between the shrink_dcache_parent() (fs/dcache.c)
> > called from kill_super() and prune_dache() called via
> > shrink_dache_memory() (called by kswapd), as follows: [...]
Your scenario sounds plausible and might explain at least some
of the autofs unmount races we've been seeing.
> > In the attached patch, I have used a semaphore to serialize purging
> > accesses to the dentry_unused list. [...]
Can we see the patch please?
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/