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.
This commit is contained in:
Bruce Evans 1999-09-04 12:35:09 +00:00
parent a5f3f7510a
commit a0f40f54aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50890
8 changed files with 28 additions and 40 deletions

View File

@ -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

View File

@ -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

View File

@ -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));

View File

@ -174,8 +174,6 @@
*
*/
#include "opt_debug_nullfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>

View File

@ -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

View File

@ -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

View File

@ -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));

View File

@ -174,8 +174,6 @@
*
*/
#include "opt_debug_nullfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>