svn commit: r215548 - in head/sys: fs/cd9660 fs/coda fs/ext2fs fs/hpfs fs/msdosfs fs/nfsclient fs/ntfs gnu/fs/reiserfs kern nfsclient sys ufs/ufs

Konstantin Belousov kib at FreeBSD.org
Fri Nov 19 21:17:34 UTC 2010


Author: kib
Date: Fri Nov 19 21:17:34 2010
New Revision: 215548
URL: http://svn.freebsd.org/changeset/base/215548

Log:
  Remove prtactive variable and related printf()s in the vop_inactive
  and vop_reclaim() methods. They seems to be unused, and the reported
  situation is normal for the forced unmount.
  
  MFC after:   1 week
  X-MFC-note:  keep prtactive symbol in vfs_subr.c

Modified:
  head/sys/fs/cd9660/cd9660_node.c
  head/sys/fs/coda/coda_vnops.c
  head/sys/fs/ext2fs/ext2_inode.c
  head/sys/fs/hpfs/hpfs_vnops.c
  head/sys/fs/msdosfs/msdosfs_denode.c
  head/sys/fs/nfsclient/nfs_clnode.c
  head/sys/fs/ntfs/ntfs_vnops.c
  head/sys/gnu/fs/reiserfs/reiserfs_inode.c
  head/sys/kern/vfs_subr.c
  head/sys/nfsclient/nfs_node.c
  head/sys/sys/vnode.h
  head/sys/ufs/ufs/ufs_inode.c

Modified: head/sys/fs/cd9660/cd9660_node.c
==============================================================================
--- head/sys/fs/cd9660/cd9660_node.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/cd9660/cd9660_node.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -69,9 +69,6 @@ cd9660_inactive(ap)
 	struct iso_node *ip = VTOI(vp);
 	int error = 0;
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("cd9660_inactive: pushing active", vp);
-
 	/*
 	 * If we are done with the inode, reclaim it
 	 * so that it can be reused immediately.
@@ -93,8 +90,6 @@ cd9660_reclaim(ap)
 {
 	struct vnode *vp = ap->a_vp;
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("cd9660_reclaim: pushing active", vp);
 	/*
 	 * Destroy the vm object and flush associated pages.
 	 */

Modified: head/sys/fs/coda/coda_vnops.c
==============================================================================
--- head/sys/fs/coda/coda_vnops.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/coda/coda_vnops.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -1549,9 +1549,6 @@ coda_reclaim(struct vop_reclaim_args *ap
 				    "%p, cp %p\n", vp, cp);
 		}
 #endif
-	} else {
-		if (prtactive && vp->v_usecount != 0)
-			vprint("coda_reclaim: pushing active", vp);
 	}
 	cache_purge(vp);
 	coda_free(VTOC(vp));

Modified: head/sys/fs/ext2fs/ext2_inode.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_inode.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/ext2fs/ext2_inode.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -481,9 +481,6 @@ ext2_inactive(ap)
 	struct thread *td = ap->a_td;
 	int mode, error = 0;
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("ext2_inactive: pushing active", vp);
-
 	/*
 	 * Ignore inodes related to stale file handles.
 	 */
@@ -522,8 +519,6 @@ ext2_reclaim(ap)
 	struct inode *ip;
 	struct vnode *vp = ap->a_vp;
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("ufs_reclaim: pushing active", vp);
 	ip = VTOI(vp);
 	if (ip->i_flag & IN_LAZYMOD) {
 		ip->i_flag |= IN_MODIFIED;

Modified: head/sys/fs/hpfs/hpfs_vnops.c
==============================================================================
--- head/sys/fs/hpfs/hpfs_vnops.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/hpfs/hpfs_vnops.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -575,9 +575,6 @@ hpfs_inactive(ap)
 			return (error);
 	}
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("hpfs_inactive: pushing active", vp);
-
 	if (hp->h_flag & H_INVAL) {
 		vrecycle(vp, ap->a_td);
 		return (0);

Modified: head/sys/fs/msdosfs/msdosfs_denode.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_denode.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/msdosfs/msdosfs_denode.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -548,8 +548,6 @@ msdosfs_reclaim(ap)
 	    dep, dep->de_Name, dep->de_refcnt);
 #endif
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("msdosfs_reclaim(): pushing active", vp);
 	/*
 	 * Destroy the vm object and flush associated pages.
 	 */
@@ -586,9 +584,6 @@ msdosfs_inactive(ap)
 	printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]);
 #endif
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("msdosfs_inactive(): pushing active", vp);
-
 	/*
 	 * Ignore denodes related to stale file handles.
 	 */

Modified: head/sys/fs/nfsclient/nfs_clnode.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clnode.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/nfsclient/nfs_clnode.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -190,8 +190,6 @@ ncl_inactive(struct vop_inactive_args *a
 	struct vnode *vp = ap->a_vp;
 
 	np = VTONFS(vp);
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("ncl_inactive: pushing active", vp);
 
 	if (NFS_ISV4(vp) && vp->v_type == VREG) {
 		/*
@@ -233,9 +231,6 @@ ncl_reclaim(struct vop_reclaim_args *ap)
 	struct nfsnode *np = VTONFS(vp);
 	struct nfsdmap *dp, *dp2;
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("ncl_reclaim: pushing active", vp);
-
 	if (NFS_ISV4(vp) && vp->v_type == VREG)
 		/*
 		 * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4

Modified: head/sys/fs/ntfs/ntfs_vnops.c
==============================================================================
--- head/sys/fs/ntfs/ntfs_vnops.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/fs/ntfs/ntfs_vnops.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -82,8 +82,6 @@ static vop_fsync_t	ntfs_fsync;
 static vop_pathconf_t	ntfs_pathconf;
 static vop_vptofh_t	ntfs_vptofh;
 
-int	ntfs_prtactive = 1;	/* 1 => print out reclaim of active vnodes */
-
 /*
  * This is a noop, simply returning what one has been given.
  */
@@ -214,15 +212,12 @@ ntfs_inactive(ap)
 		struct vnode *a_vp;
 	} */ *ap;
 {
-	register struct vnode *vp = ap->a_vp;
 #ifdef NTFS_DEBUG
-	register struct ntnode *ip = VTONT(vp);
+	register struct ntnode *ip = VTONT(ap->a_vp);
 #endif
 
-	dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", vp, ip->i_number));
-
-	if (ntfs_prtactive && vrefcnt(vp) != 0)
-		vprint("ntfs_inactive: pushing active", vp);
+	dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", ap->a_vp,
+	    ip->i_number));
 
 	/* XXX since we don't support any filesystem changes
 	 * right now, nothing more needs to be done
@@ -246,9 +241,6 @@ ntfs_reclaim(ap)
 
 	dprintf(("ntfs_reclaim: vnode: %p, ntnode: %d\n", vp, ip->i_number));
 
-	if (ntfs_prtactive && vrefcnt(vp) != 0)
-		vprint("ntfs_reclaim: pushing active", vp);
-
 	/*
 	 * Destroy the vm object and flush associated pages.
 	 */

Modified: head/sys/gnu/fs/reiserfs/reiserfs_inode.c
==============================================================================
--- head/sys/gnu/fs/reiserfs/reiserfs_inode.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/gnu/fs/reiserfs/reiserfs_inode.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -114,8 +114,6 @@ reiserfs_inactive(struct vop_inactive_ar
 
 	reiserfs_log(LOG_DEBUG, "deactivating inode used %d times\n",
 	    vp->v_usecount);
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("ReiserFS/reclaim: pushing active", vp);
 
 #if 0
 	/* Ignore inodes related to stale file handles. */
@@ -147,8 +145,6 @@ reiserfs_reclaim(struct vop_reclaim_args
 
 	reiserfs_log(LOG_DEBUG, "reclaiming inode used %d times\n",
 	    vp->v_usecount);
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("ReiserFS/reclaim: pushing active", vp);
 	ip = VTOI(vp);
 
 	/* XXX Update this node (write to the disk) */

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/kern/vfs_subr.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -191,9 +191,6 @@ struct nfs_public nfs_pub;
 static uma_zone_t vnode_zone;
 static uma_zone_t vnodepoll_zone;
 
-/* Set to 1 to print out reclaim of active vnodes */
-int	prtactive;
-
 /*
  * The workitem queue.
  *

Modified: head/sys/nfsclient/nfs_node.c
==============================================================================
--- head/sys/nfsclient/nfs_node.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/nfsclient/nfs_node.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -193,8 +193,6 @@ nfs_inactive(struct vop_inactive_args *a
 	struct thread *td = curthread;	/* XXX */
 
 	np = VTONFS(ap->a_vp);
-	if (prtactive && vrefcnt(ap->a_vp) != 0)
-		vprint("nfs_inactive: pushing active", ap->a_vp);
 	mtx_lock(&np->n_mtx);
 	if (ap->a_vp->v_type != VDIR) {
 		sp = np->n_sillyrename;
@@ -228,9 +226,6 @@ nfs_reclaim(struct vop_reclaim_args *ap)
 	struct nfsnode *np = VTONFS(vp);
 	struct nfsdmap *dp, *dp2;
 
-	if (prtactive && vrefcnt(vp) != 0)
-		vprint("nfs_reclaim: pushing active", vp);
-
 	/*
 	 * If the NLM is running, give it a chance to abort pending
 	 * locks.

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/sys/vnode.h	Fri Nov 19 21:17:34 2010	(r215548)
@@ -410,7 +410,6 @@ extern	struct vnode *rootvnode;	/* root 
 extern	int async_io_version;		/* 0 or POSIX version of AIO i'face */
 extern	int desiredvnodes;		/* number of vnodes desired */
 extern	struct uma_zone *namei_zone;
-extern	int prtactive;			/* nonzero to call vprint() */
 extern	struct vattr va_null;		/* predefined null vattr structure */
 
 #define	VI_LOCK(vp)	mtx_lock(&(vp)->v_interlock)

Modified: head/sys/ufs/ufs/ufs_inode.c
==============================================================================
--- head/sys/ufs/ufs/ufs_inode.c	Fri Nov 19 21:15:06 2010	(r215547)
+++ head/sys/ufs/ufs/ufs_inode.c	Fri Nov 19 21:17:34 2010	(r215548)
@@ -80,8 +80,6 @@ ufs_inactive(ap)
 	struct mount *mp;
 
 	mp = NULL;
-	if (prtactive && vp->v_usecount != 0)
-		vprint("ufs_inactive: pushing active", vp);
 	/*
 	 * Ignore inodes related to stale file handles.
 	 */
@@ -191,8 +189,6 @@ ufs_reclaim(ap)
 	int i;
 #endif
 
-	if (prtactive && vp->v_usecount != 0)
-		vprint("ufs_reclaim: pushing active", vp);
 	/*
 	 * Destroy the vm object and flush associated pages.
 	 */


More information about the svn-src-head mailing list