summaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-01-09 12:43:18 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-01-09 12:43:18 +0000
commitfb4205421dd06345cb985ab4252728fdb3a7a304 (patch)
tree5fb7c27ad703407502e64635f74ff375fb280958 /sys/ufs
parent046383c234884c958ab6ca9ea5fddba703102e1b (diff)
Put vprint() under DIAGNOSTIC, as to save space in generated ramdisks.
Inspiration from miod@, okay deraadt@. Tested on i386, macppc and amd64.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ext2fs/ext2fs_inode.c7
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c4
-rw-r--r--sys/ufs/ufs/ufs_inode.c7
-rw-r--r--sys/ufs/ufs/ufs_vnops.c7
4 files changed, 20 insertions, 5 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c
index 57d37e6d360..03dfb174b57 100644
--- a/sys/ufs/ext2fs/ext2fs_inode.c
+++ b/sys/ufs/ext2fs/ext2fs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_inode.c,v 1.31 2005/12/15 13:44:28 krw Exp $ */
+/* $OpenBSD: ext2fs_inode.c,v 1.32 2006/01/09 12:43:17 pedro Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */
/*
@@ -117,10 +117,13 @@ ext2fs_inactive(v)
struct proc *p = ap->a_p;
struct timespec ts;
int error = 0;
+#ifdef DIAGNOSTIC
extern int prtactive;
-
+
if (prtactive && vp->v_usecount != 0)
vprint("ext2fs_inactive: pushing active", vp);
+#endif
+
/* Get rid of inodes related to stale file handles. */
if (ip->i_e2fs_mode == 0 || ip->i_e2fs_dtime != 0)
goto out;
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index 9d4a23fab82..a5fb2cdb455 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.43 2005/12/14 22:03:01 pedro Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.44 2006/01/09 12:43:17 pedro Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -1327,10 +1327,12 @@ ext2fs_reclaim(v)
} */ *ap = v;
register struct vnode *vp = ap->a_vp;
struct inode *ip;
+#ifdef DIAGNOSTIC
extern int prtactive;
if (prtactive && vp->v_usecount != 0)
vprint("ext2fs_reclaim: pushing active", vp);
+#endif
/*
* Remove the inode from its hash chain.
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index 6fbade9a37b..5860865e5d9 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_inode.c,v 1.33 2005/12/28 20:48:18 pedro Exp $ */
+/* $OpenBSD: ufs_inode.c,v 1.34 2006/01/09 12:43:17 pedro Exp $ */
/* $NetBSD: ufs_inode.c,v 1.7 1996/05/11 18:27:52 mycroft Exp $ */
/*
@@ -72,10 +72,12 @@ ufs_inactive(void *v)
struct proc *p = ap->a_p;
mode_t mode;
int error = 0;
+#ifdef DIAGNOSTIC
extern int prtactive;
if (prtactive && vp->v_usecount != 0)
vprint("ffs_inactive: pushing active", vp);
+#endif
/*
* Ignore inodes related to stale file handles.
@@ -135,10 +137,13 @@ int
ufs_reclaim(struct vnode *vp, struct proc *p)
{
struct inode *ip;
+#ifdef DIAGNOSTIC
extern int prtactive;
if (prtactive && vp->v_usecount != 0)
vprint("ufs_reclaim: pushing active", vp);
+#endif
+
/*
* Remove the inode from its hash chain.
*/
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 98ea0844735..0efa09d83e0 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_vnops.c,v 1.71 2005/12/28 20:48:18 pedro Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.72 2006/01/09 12:43:17 pedro Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -1706,9 +1706,11 @@ ufs_strategy(void *v)
int
ufs_print(void *v)
{
+#ifdef DIAGNOSTIC
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap = v;
+
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
@@ -1725,6 +1727,9 @@ ufs_print(void *v)
#endif /* FIFO */
lockmgr_printinfo(&ip->i_lock);
printf("\n");
+
+#endif /* DIAGNOSTIC */
+
return (0);
}