Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2011 21:00:22 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/157365: commit references a PR
Message-ID:  <201105292100.p4TL0MSv036613@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/157365; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/157365: commit references a PR
Date: Sun, 29 May 2011 20:55:36 +0000 (UTC)

 Author: rmacklem
 Date: Sun May 29 20:55:23 2011
 New Revision: 222464
 URL: http://svn.freebsd.org/changeset/base/222464
 
 Log:
   Add a check for MNTK_UNMOUNTF at the beginning of nfs_sync()
   in the old NFS client so that a forced dismount doesn't
   get stuck in the VFS_SYNC() call that happens before
   VFS_UNMOUNT() in dounmount(). Analagous to r222329 for the new NFS client.
   An additional change is needed before forced dismounts will work.
   
   PR:		kern/157365
   MFC after:	2 weeks
 
 Modified:
   head/sys/nfsclient/nfs_vfsops.c
 
 Modified: head/sys/nfsclient/nfs_vfsops.c
 ==============================================================================
 --- head/sys/nfsclient/nfs_vfsops.c	Sun May 29 20:46:53 2011	(r222463)
 +++ head/sys/nfsclient/nfs_vfsops.c	Sun May 29 20:55:23 2011	(r222464)
 @@ -1408,10 +1408,20 @@ nfs_sync(struct mount *mp, int waitfor)
  
  	td = curthread;
  
 +	MNT_ILOCK(mp);
 +	/*
 +	 * If a forced dismount is in progress, return from here so that
 +	 * the umount(2) syscall doesn't get stuck in VFS_SYNC() before
 +	 * calling VFS_UNMOUNT().
 +	 */
 +	if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) {
 +		MNT_IUNLOCK(mp);
 +		return (EBADF);
 +	}
 +
  	/*
  	 * Force stale buffer cache information to be flushed.
  	 */
 -	MNT_ILOCK(mp);
  loop:
  	MNT_VNODE_FOREACH(vp, mp, mvp) {
  		VI_LOCK(vp);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105292100.p4TL0MSv036613>