public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Banks <gnb@sgi.com>
To: raven@themaw.net
Cc: Thomas Moestl <moestl@ibr.cs.tu-bs.de>,
	autofs mailing list <autofs@linux.kernel.org>,
	nfs@lists.sourceforge.net,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [autofs] Re: umount() and NFS races in 2.4.26
Date: Sun, 11 Jul 2004 01:25:49 +1000	[thread overview]
Message-ID: <20040710152549.GD21121@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0407101419210.1378@donald.themaw.net>

On Sat, Jul 10, 2004 at 02:57:46PM +0800, raven@themaw.net 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@1.13

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.

  reply	other threads:[~2004-07-10 15:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-08 18:07 umount() and NFS races in 2.4.26 Thomas Moestl
2004-07-09 14:32 ` Marcelo Tosatti
2004-07-10 21:38   ` Trond Myklebust
2004-07-11  0:32     ` viro
2004-07-10  6:57 ` raven
2004-07-10 15:25   ` Greg Banks [this message]
2004-07-10 18:25     ` [autofs] " Thomas Moestl
2004-07-10 18:19   ` Thomas Moestl
2004-07-10 19:25     ` raven
2004-07-10 19:50       ` Thomas Moestl
2004-07-11 10:16     ` raven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040710152549.GD21121@sgi.com \
    --to=gnb@sgi.com \
    --cc=autofs@linux.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moestl@ibr.cs.tu-bs.de \
    --cc=nfs@lists.sourceforge.net \
    --cc=raven@themaw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox