summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/nullfs
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-09-04 12:35:09 +0000
committerbde <bde@FreeBSD.org>1999-09-04 12:35:09 +0000
commitc8a2ac644d5eaa2224006a4d5efdeabd75b14aaa (patch)
tree5893916f5fe8e83cd5577b344519e09155e934e0 /sys/miscfs/nullfs
parent309a6171c650eb7e6b7161f8b4a38c5765cfd173 (diff)
downloadFreeBSD-src-c8a2ac644d5eaa2224006a4d5efdeabd75b14aaa.zip
FreeBSD-src-c8a2ac644d5eaa2224006a4d5efdeabd75b14aaa.tar.gz
Get rid of the NULLFS_DIAGNOSTIC option. This option was as useful as
the other XXXFS_DIAGNOSTIC options (not very) and mostly controlled tracing of normal operation. Use `#ifdef DEBUG' for non-diagnostics and `#ifdef DIAGNOSTIC' for diagnostics.
Diffstat (limited to 'sys/miscfs/nullfs')
-rw-r--r--sys/miscfs/nullfs/null.h2
-rw-r--r--sys/miscfs/nullfs/null_subr.c12
-rw-r--r--sys/miscfs/nullfs/null_vfsops.c18
-rw-r--r--sys/miscfs/nullfs/null_vnops.c2
4 files changed, 14 insertions, 20 deletions
diff --git a/sys/miscfs/nullfs/null.h b/sys/miscfs/nullfs/null.h
index f796d18..fcd179e 100644
--- a/sys/miscfs/nullfs/null.h
+++ b/sys/miscfs/nullfs/null.h
@@ -63,7 +63,7 @@ extern int null_node_create __P((struct mount *mp, struct vnode *target, struct
#define MOUNTTONULLMOUNT(mp) ((struct null_mount *)((mp)->mnt_data))
#define VTONULL(vp) ((struct null_node *)(vp)->v_data)
#define NULLTOV(xp) ((xp)->null_vnode)
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DIAGNOSTIC
extern struct vnode *null_checkvp __P((struct vnode *vp, char *fil, int lno));
#define NULLVPTOLOWERVP(vp) null_checkvp((vp), __FILE__, __LINE__)
#else
diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c
index 1504fc8..ad37a1e 100644
--- a/sys/miscfs/nullfs/null_subr.c
+++ b/sys/miscfs/nullfs/null_subr.c
@@ -38,8 +38,6 @@
* $FreeBSD$
*/
-#include "opt_debug_nullfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -77,7 +75,7 @@ nullfs_init(vfsp)
struct vfsconf *vfsp;
{
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_init\n"); /* printed during system boot */
#endif
null_node_hashtbl = hashinit(NNULLNODECACHE, M_CACHE, &null_node_hash);
@@ -198,7 +196,7 @@ null_node_create(mp, lowervp, newvpp)
* null_node_find has taken another reference
* to the alias vnode.
*/
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
vprint("null_node_create: exists", aliasvp);
#endif
/* VREF(aliasvp); --- done in null_node_find */
@@ -208,7 +206,7 @@ null_node_create(mp, lowervp, newvpp)
/*
* Get new vnode.
*/
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("null_node_create: create new alias vnode\n");
#endif
@@ -235,7 +233,7 @@ null_node_create(mp, lowervp, newvpp)
};
#endif
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
vprint("null_node_create: alias", aliasvp);
vprint("null_node_create: lower", lowervp);
#endif
@@ -244,7 +242,7 @@ null_node_create(mp, lowervp, newvpp)
return (0);
}
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DIAGNOSTIC
#include "opt_ddb.h"
#ifdef DDB
diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c
index f6ac5a0..730eb80 100644
--- a/sys/miscfs/nullfs/null_vfsops.c
+++ b/sys/miscfs/nullfs/null_vfsops.c
@@ -44,8 +44,6 @@
* (See null_vnops.c for a description of what this does.)
*/
-#include "opt_debug_nullfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -96,7 +94,7 @@ nullfs_mount(mp, path, data, ndp, p)
u_int size;
int isvnunlocked = 0;
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_mount(mp = %p)\n", (void *)mp);
#endif
@@ -151,7 +149,7 @@ nullfs_mount(mp, path, data, ndp, p)
* Check multi null mount to avoid `lock against myself' panic.
*/
if (lowerrootvp == VTONULL(mp->mnt_vnodecovered)->null_lowervp) {
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_mount: multi null mount?\n");
#endif
return (EDEADLK);
@@ -201,7 +199,7 @@ nullfs_mount(mp, path, data, ndp, p)
&size);
bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
(void)nullfs_statfs(mp, &mp->mnt_stat, p);
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_mount: lower %s, alias at %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
#endif
@@ -236,7 +234,7 @@ nullfs_unmount(mp, mntflags, p)
int error;
int flags = 0;
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_unmount(mp = %p)\n", (void *)mp);
#endif
@@ -259,7 +257,7 @@ nullfs_unmount(mp, mntflags, p)
if (error)
return (error);
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
vprint("alias root of lower", nullm_rootvp);
#endif
/*
@@ -286,7 +284,7 @@ nullfs_root(mp, vpp)
struct proc *p = curproc; /* XXX */
struct vnode *vp;
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_root(mp = %p, vp = %p->%p)\n", (void *)mp,
(void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
(void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
@@ -302,7 +300,7 @@ nullfs_root(mp, vpp)
* XXX
* Should we check type of node?
*/
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_root: multi null mount?\n");
#endif
vrele(vp);
@@ -333,7 +331,7 @@ nullfs_statfs(mp, sbp, p)
int error;
struct statfs mstat;
-#ifdef NULLFS_DIAGNOSTIC
+#ifdef DEBUG
printf("nullfs_statfs(mp = %p, vp = %p->%p)\n", (void *)mp,
(void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
(void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c
index 6156d0f..225ac09 100644
--- a/sys/miscfs/nullfs/null_vnops.c
+++ b/sys/miscfs/nullfs/null_vnops.c
@@ -174,8 +174,6 @@
*
*/
-#include "opt_debug_nullfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
OpenPOWER on IntegriCloud