Date: Fri, 19 Nov 2010 00:02:18 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: fs@freebsd.org Subject: prtactive Message-ID: <20101118220218.GM2392@deviant.kiev.zoral.com.ua>
next in thread | raw e-mail | index | archive | help
--MHmrXEmXDnZIcfiz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Did anybody on the list used or consider it useful the printf()s in miscellaneous VOP_INACTIVE and VOP_RECLAIM implementations ? I plan to axe prtactive and corresponding printfs that seems to be never activated on my memory. The situation where the message would be emited is completely legitimate (forced unmount). I will commit the following patch, unless valid reason to not is given. diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c index 64d449e..e1c68c6 100644 --- a/sys/fs/cd9660/cd9660_node.c +++ b/sys/fs/cd9660/cd9660_node.c @@ -69,9 +69,6 @@ cd9660_inactive(ap) struct iso_node *ip =3D VTOI(vp); int error =3D 0; =20 - if (prtactive && vrefcnt(vp) !=3D 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 =3D ap->a_vp; =20 - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("cd9660_reclaim: pushing active", vp); /* * Destroy the vm object and flush associated pages. */ diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 02f6eb5..51fb307 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -1549,9 +1549,6 @@ coda_reclaim(struct vop_reclaim_args *ap) "%p, cp %p\n", vp, cp); } #endif - } else { - if (prtactive && vp->v_usecount !=3D 0) - vprint("coda_reclaim: pushing active", vp); } cache_purge(vp); coda_free(VTOC(vp)); diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c index 2cf60a7..fc65a63 100644 --- a/sys/fs/ext2fs/ext2_inode.c +++ b/sys/fs/ext2fs/ext2_inode.c @@ -481,9 +481,6 @@ ext2_inactive(ap) struct thread *td =3D ap->a_td; int mode, error =3D 0; =20 - if (prtactive && vrefcnt(vp) !=3D 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 =3D ap->a_vp; =20 - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("ufs_reclaim: pushing active", vp); ip =3D VTOI(vp); if (ip->i_flag & IN_LAZYMOD) { ip->i_flag |=3D IN_MODIFIED; diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c index 4ec6b1e..3859478 100644 --- a/sys/fs/hpfs/hpfs_vnops.c +++ b/sys/fs/hpfs/hpfs_vnops.c @@ -575,9 +575,6 @@ hpfs_inactive(ap) return (error); } =20 - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("hpfs_inactive: pushing active", vp); - if (hp->h_flag & H_INVAL) { vrecycle(vp, ap->a_td); return (0); diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denod= e.c index 9ad892e..84b52ba 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -548,8 +548,6 @@ msdosfs_reclaim(ap) dep, dep->de_Name, dep->de_refcnt); #endif =20 - if (prtactive && vrefcnt(vp) !=3D 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 =20 - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("msdosfs_inactive(): pushing active", vp); - /* * Ignore denodes related to stale file handles. */ diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index 430b494..01e1919 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -190,8 +190,6 @@ ncl_inactive(struct vop_inactive_args *ap) struct vnode *vp =3D ap->a_vp; =20 np =3D VTONFS(vp); - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("ncl_inactive: pushing active", vp); =20 if (NFS_ISV4(vp) && vp->v_type =3D=3D VREG) { /* @@ -233,9 +231,6 @@ ncl_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np =3D VTONFS(vp); struct nfsdmap *dp, *dp2; =20 - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("ncl_reclaim: pushing active", vp); - if (NFS_ISV4(vp) && vp->v_type =3D=3D VREG) /* * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4 diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c index ee62a5c..6970474 100644 --- a/sys/fs/ntfs/ntfs_vnops.c +++ b/sys/fs/ntfs/ntfs_vnops.c @@ -82,8 +82,6 @@ static vop_fsync_t ntfs_fsync; static vop_pathconf_t ntfs_pathconf; static vop_vptofh_t ntfs_vptofh; =20 -int ntfs_prtactive =3D 1; /* 1 =3D> 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 =3D ap->a_vp; #ifdef NTFS_DEBUG - register struct ntnode *ip =3D VTONT(vp); + register struct ntnode *ip =3D VTONT(ap->a_vp); #endif =20 - dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - - if (ntfs_prtactive && vrefcnt(vp) !=3D 0) - vprint("ntfs_inactive: pushing active", vp); + dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", ap->a_vp, + ip->i_number)); =20 /* XXX since we don't support any filesystem changes * right now, nothing more needs to be done @@ -246,9 +241,6 @@ ntfs_reclaim(ap) =20 dprintf(("ntfs_reclaim: vnode: %p, ntnode: %d\n", vp, ip->i_number)); =20 - if (ntfs_prtactive && vrefcnt(vp) !=3D 0) - vprint("ntfs_reclaim: pushing active", vp); - /* * Destroy the vm object and flush associated pages. */ diff --git a/sys/gnu/fs/reiserfs/reiserfs_inode.c b/sys/gnu/fs/reiserfs/rei= serfs_inode.c index 46edbf4..b63ed74 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_inode.c +++ b/sys/gnu/fs/reiserfs/reiserfs_inode.c @@ -114,8 +114,6 @@ reiserfs_inactive(struct vop_inactive_args *ap) =20 reiserfs_log(LOG_DEBUG, "deactivating inode used %d times\n", vp->v_usecount); - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("ReiserFS/reclaim: pushing active", vp); =20 #if 0 /* Ignore inodes related to stale file handles. */ @@ -147,8 +145,6 @@ reiserfs_reclaim(struct vop_reclaim_args *ap) =20 reiserfs_log(LOG_DEBUG, "reclaiming inode used %d times\n", vp->v_usecount); - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("ReiserFS/reclaim: pushing active", vp); ip =3D VTOI(vp); =20 /* XXX Update this node (write to the disk) */ diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4a4cef1..b032513 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -191,9 +191,6 @@ struct nfs_public nfs_pub; static uma_zone_t vnode_zone; static uma_zone_t vnodepoll_zone; =20 -/* Set to 1 to print out reclaim of active vnodes */ -int prtactive; - /* * The workitem queue. * diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 5b87bd7..5b43b3d 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -193,8 +193,6 @@ nfs_inactive(struct vop_inactive_args *ap) struct thread *td =3D curthread; /* XXX */ =20 np =3D VTONFS(ap->a_vp); - if (prtactive && vrefcnt(ap->a_vp) !=3D 0) - vprint("nfs_inactive: pushing active", ap->a_vp); mtx_lock(&np->n_mtx); if (ap->a_vp->v_type !=3D VDIR) { sp =3D np->n_sillyrename; @@ -228,9 +226,6 @@ nfs_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np =3D VTONFS(vp); struct nfsdmap *dp, *dp2; =20 - if (prtactive && vrefcnt(vp) !=3D 0) - vprint("nfs_reclaim: pushing active", vp); - /* * If the NLM is running, give it a chance to abort pending * locks. diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index e82f8ea..86ff8b6 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -410,7 +410,6 @@ extern struct vnode *rootvnode; /* root (i.e. "/") vnod= e */ 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 */ =20 #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index a281ae5..e21092c 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -80,8 +80,6 @@ ufs_inactive(ap) struct mount *mp; =20 mp =3D NULL; - if (prtactive && vp->v_usecount !=3D 0) - vprint("ufs_inactive: pushing active", vp); /* * Ignore inodes related to stale file handles. */ @@ -191,8 +189,6 @@ ufs_reclaim(ap) int i; #endif =20 - if (prtactive && vp->v_usecount !=3D 0) - vprint("ufs_reclaim: pushing active", vp); /* * Destroy the vm object and flush associated pages. */ --MHmrXEmXDnZIcfiz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzlomkACgkQC3+MBN1Mb4h9pgCfeRenisTuDAtQV6FEpcJZSRhX eXMAoOPxCwXa/MDdfHsNGxJwLxg7FE7f =qmSK -----END PGP SIGNATURE----- --MHmrXEmXDnZIcfiz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101118220218.GM2392>