diff options
author | phk <phk@FreeBSD.org> | 2002-09-30 08:46:29 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-30 08:46:29 +0000 |
commit | 02a0f0a003f7befdf2f0a7eaf43cb5b8b180959b (patch) | |
tree | ba06e76097295f802859421fcb9db9c4c18b02cb | |
parent | 32f24fac14d30817ba7551f956bec277295d50de (diff) | |
download | FreeBSD-src-02a0f0a003f7befdf2f0a7eaf43cb5b8b180959b.zip FreeBSD-src-02a0f0a003f7befdf2f0a7eaf43cb5b8b180959b.tar.gz |
Disable the g_sanity() check unless people ask for it in the debugflags.
Sponsored by: DARPA & NAI Labs.
-rw-r--r-- | sys/geom/geom_int.h | 4 | ||||
-rw-r--r-- | sys/geom/geom_subr.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/geom_int.h b/sys/geom/geom_int.h index 5e742a0..ecb5170 100644 --- a/sys/geom/geom_int.h +++ b/sys/geom/geom_int.h @@ -41,6 +41,10 @@ TAILQ_HEAD(event_tailq_head, g_event); extern struct event_tailq_head events; extern int g_debugflags; +/* 1 G_T_TOPOLOGY */ +/* 2 G_T_BIO */ +/* 4 G_T_ACCESS */ +/* 8 enable sanity checks */ /* * Various internal actions are tracked by tagging g_event[s] onto diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 550dec6..25f6a0c 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -670,6 +670,8 @@ g_sanity(void *ptr) struct g_consumer *cp; struct g_provider *pp; + if (!(g_debugflags & 0x8)) + return; LIST_FOREACH(mp, &g_classes, class) { KASSERT(mp != ptr, ("Ptr is live class")); KASSERT(mp->protect == 0x20016600, |