Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Eliminate crusty debugging sludge.



details:   https://anonhg.NetBSD.org/src/rev/8e4a3a6b83cb
branches:  trunk
changeset: 824176:8e4a3a6b83cb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri May 26 14:34:19 2017 +0000

description:
Eliminate crusty debugging sludge.

We have a mostly sane vnode lifecycle now.  If this needs debugging,
it should be done once at the call site of VOP_RECLAIM.

diffstat:

 sys/fs/cd9660/cd9660_node.c       |  8 ++------
 sys/fs/filecorefs/filecore_node.c |  9 ++-------
 sys/fs/msdosfs/msdosfs_denode.c   |  8 ++------
 sys/fs/nilfs/nilfs_vnops.c        |  9 ++-------
 sys/fs/ntfs/ntfs_vnops.c          |  9 ++-------
 sys/fs/smbfs/smbfs_node.c         |  8 ++------
 sys/fs/udf/udf_vnops.c            |  9 ++-------
 sys/kern/vfs_subr.c               |  5 ++---
 sys/nfs/nfs_node.c                |  9 ++-------
 sys/ufs/ext2fs/ext2fs_inode.c     |  8 ++------
 sys/ufs/lfs/ulfs_inode.c          |  9 ++-------
 sys/ufs/ufs/ufs_inode.c           |  9 ++-------
 12 files changed, 24 insertions(+), 76 deletions(-)

diffs (truncated from 429 to 300 lines):

diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/cd9660/cd9660_node.c
--- a/sys/fs/cd9660/cd9660_node.c       Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/cd9660/cd9660_node.c       Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660_node.c,v 1.37 2017/05/26 14:21:00 riastradh Exp $       */
+/*     $NetBSD: cd9660_node.c,v 1.38 2017/05/26 14:34:19 riastradh Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1994
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_node.c,v 1.37 2017/05/26 14:21:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_node.c,v 1.38 2017/05/26 14:34:19 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,8 +57,6 @@
 #include <fs/cd9660/cd9660_mount.h>
 #include <fs/cd9660/iso_rrip.h>
 
-extern int prtactive;  /* 1 => print out reclaim of active vnodes */
-
 struct pool cd9660_node_pool;
 
 static u_int cd9660_chars2ui(const u_char *, int);
@@ -133,8 +131,6 @@
 
        VOP_UNLOCK(vp);
 
-       if (prtactive && vp->v_usecount > 1)
-               vprint("cd9660_reclaim: pushing active", vp);
        /*
         * Purge old data structures associated with the inode.
         */
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/filecorefs/filecore_node.c
--- a/sys/fs/filecorefs/filecore_node.c Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/filecorefs/filecore_node.c Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filecore_node.c,v 1.30 2017/05/26 14:21:00 riastradh Exp $     */
+/*     $NetBSD: filecore_node.c,v 1.31 2017/05/26 14:34:19 riastradh Exp $     */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1994
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filecore_node.c,v 1.30 2017/05/26 14:21:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filecore_node.c,v 1.31 2017/05/26 14:34:19 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,8 +89,6 @@
 
 struct pool            filecore_node_pool;
 
-extern int prtactive;  /* 1 => print out reclaim of active vnodes */
-
 static const struct genfs_ops filecore_genfsops = {
         .gop_size = genfs_size,
 };
@@ -246,9 +244,6 @@
 
        VOP_UNLOCK(vp);
 
-       if (prtactive && vp->v_usecount > 1)
-               vprint("filecore_reclaim: pushing active", vp);
-
        /*
         * Purge old data structures associated with the inode.
         */
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/msdosfs/msdosfs_denode.c
--- a/sys/fs/msdosfs/msdosfs_denode.c   Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/msdosfs/msdosfs_denode.c   Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msdosfs_denode.c,v 1.55 2017/05/26 14:21:00 riastradh Exp $    */
+/*     $NetBSD: msdosfs_denode.c,v 1.56 2017/05/26 14:34:19 riastradh Exp $    */
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.55 2017/05/26 14:21:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.56 2017/05/26 14:34:19 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -73,8 +73,6 @@
 
 struct pool msdosfs_denode_pool;
 
-extern int prtactive;
-
 struct fh_key {
        struct msdosfsmount *fhk_mount;
        uint32_t fhk_dircluster;
@@ -545,8 +543,6 @@
            dep, dep->de_Name, dep->de_refcnt);
 #endif
 
-       if (prtactive && vp->v_usecount > 1)
-               vprint("msdosfs_reclaim(): pushing active", vp);
        /*
         * Purge old data structures associated with the denode.
         */
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/nilfs/nilfs_vnops.c
--- a/sys/fs/nilfs/nilfs_vnops.c        Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/nilfs/nilfs_vnops.c        Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_vnops.c,v 1.36 2017/05/26 14:21:00 riastradh Exp $ */
+/* $NetBSD: nilfs_vnops.c,v 1.37 2017/05/26 14:34:19 riastradh Exp $ */
 
 /*
  * Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.36 2017/05/26 14:21:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.37 2017/05/26 14:34:19 riastradh Exp $");
 #endif /* not lint */
 
 
@@ -61,9 +61,6 @@
 #define VTOI(vnode) ((struct nilfs_node *) (vnode)->v_data)
 
 
-/* externs */
-extern int prtactive;
-
 /* implementations of vnode functions; table follows at end */
 /* --------------------------------------------------------------------- */
 
@@ -108,8 +105,6 @@
        VOP_UNLOCK(vp);
 
        DPRINTF(NODE, ("nilfs_reclaim called for node %p\n", nilfs_node));
-       if (prtactive && vp->v_usecount > 1)
-               vprint("nilfs_reclaim(): pushing active", vp);
 
        if (nilfs_node == NULL) {
                DPRINTF(NODE, ("nilfs_reclaim(): null nilfsnode\n"));
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/ntfs/ntfs_vnops.c
--- a/sys/fs/ntfs/ntfs_vnops.c  Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/ntfs/ntfs_vnops.c  Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntfs_vnops.c,v 1.62 2017/05/26 14:21:00 riastradh Exp $        */
+/*     $NetBSD: ntfs_vnops.c,v 1.63 2017/05/26 14:34:20 riastradh Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ntfs_vnops.c,v 1.62 2017/05/26 14:21:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ntfs_vnops.c,v 1.63 2017/05/26 14:34:20 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -79,8 +79,6 @@
 static int     ntfs_fsync(void *);
 static int     ntfs_pathconf(void *);
 
-extern int prtactive;
-
 /*
  * This is a noop, simply returning what one has been given.
  */
@@ -243,9 +241,6 @@
        dprintf(("ntfs_reclaim: vnode: %p, ntnode: %llu\n", vp,
            (unsigned long long)ip->i_number));
 
-       if (prtactive && vp->v_usecount > 1)
-               vprint("ntfs_reclaim: pushing active", vp);
-
        if ((error = ntfs_ntget(ip)) != 0)
                return (error);
 
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/smbfs/smbfs_node.c
--- a/sys/fs/smbfs/smbfs_node.c Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/smbfs/smbfs_node.c Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_node.c,v 1.56 2017/05/26 14:21:01 riastradh Exp $        */
+/*     $NetBSD: smbfs_node.c,v 1.57 2017/05/26 14:34:20 riastradh Exp $        */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.56 2017/05/26 14:21:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.57 2017/05/26 14:34:20 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,7 +63,6 @@
 #include <fs/smbfs/smbfs_subr.h>
 
 extern int (**smbfs_vnodeop_p)(void *);
-extern int prtactive;
 
 static const struct genfs_ops smbfs_genfsops = {
        .gop_write = genfs_compat_gop_write,
@@ -224,9 +223,6 @@
 
        VOP_UNLOCK(vp);
 
-       if (prtactive && vp->v_usecount > 1)
-               vprint("smbfs_reclaim(): pushing active", vp);
-
        SMBVDEBUG("%.*s,%d\n", (int) np->n_nmlen, np->n_name, vp->v_usecount);
 
        dvp = (np->n_parent && (np->n_flag & NREFPARENT)) ?
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/fs/udf/udf_vnops.c
--- a/sys/fs/udf/udf_vnops.c    Fri May 26 14:22:53 2017 +0000
+++ b/sys/fs/udf/udf_vnops.c    Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.105 2017/05/26 14:21:01 riastradh Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.106 2017/05/26 14:34:20 riastradh Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.105 2017/05/26 14:21:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.106 2017/05/26 14:34:20 riastradh Exp $");
 #endif /* not lint */
 
 
@@ -71,9 +71,6 @@
 static int udf_do_readlink(struct udf_node *udf_node, uint64_t filesize,
        uint8_t *targetbuf, int *length);
 
-/* externs */
-extern int prtactive;
-
 /* implementations of vnode functions; table follows at end */
 /* --------------------------------------------------------------------- */
 
@@ -139,8 +136,6 @@
        VOP_UNLOCK(vp);
 
        DPRINTF(NODE, ("udf_reclaim called for node %p\n", udf_node));
-       if (prtactive && vp->v_usecount > 1)
-               vprint("udf_reclaim(): pushing active", vp);
 
        if (udf_node == NULL) {
                DPRINTF(NODE, ("udf_reclaim(): null udfnode\n"));
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Fri May 26 14:22:53 2017 +0000
+++ b/sys/kern/vfs_subr.c       Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.466 2017/05/24 09:53:55 hannken Exp $   */
+/*     $NetBSD: vfs_subr.c,v 1.467 2017/05/26 14:34:19 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.466 2017/05/24 09:53:55 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.467 2017/05/26 14:34:19 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -118,7 +118,6 @@
 }
 
 int doforce = 1;               /* 1 => permit forcible unmounting */
-int prtactive = 0;             /* 1 => print out reclaim of active vnodes */
 
 extern struct mount *dead_rootmount;
 
diff -r aa9dff60182c -r 8e4a3a6b83cb sys/nfs/nfs_node.c
--- a/sys/nfs/nfs_node.c        Fri May 26 14:22:53 2017 +0000
+++ b/sys/nfs/nfs_node.c        Fri May 26 14:34:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_node.c,v 1.121 2017/05/26 14:21:02 riastradh Exp $ */
+/*     $NetBSD: nfs_node.c,v 1.122 2017/05/26 14:34:20 riastradh Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.121 2017/05/26 14:21:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.122 2017/05/26 14:34:20 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"



Home | Main Index | Thread Index | Old Index