From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Pearson Subject: Re: [PATCH] SGI 882960: Busy inodes after unmount, oops Date: Thu, 05 Feb 2004 12:40:35 +0000 Sender: nfs-admin@lists.sourceforge.net Message-ID: <402239C3.AD21DDAD@moving-picture.com> References: <40209B6D.56ED461E@melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Trond Myklebust , Linux NFS Mailing List Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1Aoiok-0004XI-1l for nfs@lists.sourceforge.net; Thu, 05 Feb 2004 04:41:14 -0800 Received: from mpc-26.sohonet.co.uk ([193.203.82.251] helo=moving-picture.com) by sc8-sf-mx1.sourceforge.net with esmtp (Exim 4.30) id 1Aoiog-0008PW-UB for nfs@lists.sourceforge.net; Thu, 05 Feb 2004 04:41:11 -0800 To: Greg Banks Errors-To: nfs-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Post: List-Help: List-Subscribe: , List-Archive: I notice this patch doesn't apply cleanly with Trond's fix_unlink patch - can the two patches live together? Thanks James Pearson Greg Banks wrote: > > G'day, > > This patch fixes a bug where the forced killing of pending asynchronous > unlink rpc_tasks during unmount leaks inode reference counts for the > parent of the silly-renamed file and all its ancestor directories, > resulting in the message > > VFS: Busy inodes after unmount. Self-destruct in 5 seconds. Have a nice day... > > and a few seconds later an oops with a stack trace ending in > prune_dcache -> nfs_dentry_iput -> iput. > > This is probably also the bug discussed last September on the autofs > mailing list. The patch posted by Olaf Hering then has no effect > at all, but it did put me on the right track (thanks Olaf). > > The first part makes sure that dput() will unhash and kill dentries > and their parents if called while the unmount is underway. > > The second part moves the dput() call from the tk_exit callback of > the async unlink rpc_task to the tk_release callback so that it > will be called if the rpc_task is killed by rpc_killall_tasks() > instead of completing normally. > > =========================================================================== > linux/linux/fs/nfs/dir.c > =========================================================================== > > --- /usr/tmp/TmpDir.27555-0/linux/linux/fs/nfs/dir.c_1.32 Wed Feb 4 17:57:23 2004 > +++ linux/linux/fs/nfs/dir.c Wed Feb 4 17:52:20 2004 > @@ -551,6 +551,11 @@ static int nfs_dentry_delete(struct dent > /* Unhash it, so that ->d_iput() would be called */ > return 1; > } > + if (!(dentry->d_sb->s_flags & MS_ACTIVE)) { > + /* Unhash it, so that ancestors of killed async unlink > + * files will be cleaned up during umount */ > + return 1; > + } > return 0; > > } > > =========================================================================== > linux/linux/fs/nfs/unlink.c > =========================================================================== > > --- /usr/tmp/TmpDir.27555-0/linux/linux/fs/nfs/unlink.c_1.6 Wed Feb 4 17:57:23 2004 > +++ linux/linux/fs/nfs/unlink.c Wed Feb 4 17:56:57 2004 > @@ -51,6 +51,7 @@ static void > nfs_put_unlinkdata(struct nfs_unlinkdata *data) > { > if (--data->count == 0) { > + dput(data->dir); > nfs_detach_unlinkdata(data); > if (data->name.name != NULL) > kfree(data->name.name); > @@ -132,7 +133,6 @@ nfs_async_unlink_done(struct rpc_task *t > NFS_PROTO(dir_i)->unlink_done(dir, &task->tk_msg); > put_rpccred(data->cred); > data->cred = NULL; > - dput(dir); > } > > /** > > Greg. > -- > Greg Banks, R&D Software Engineer, SGI Australian Software Group. > I don't speak for SGI. > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > NFS maillist - NFS@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs