summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-07 10:55:48 +0000
committerphk <phk@FreeBSD.org>2003-06-07 10:55:48 +0000
commitdd1aaed4176a17e2aa5cc19f2b08672164b4f8e6 (patch)
tree4b38b49cb630f1eb3fc2c59dcc60aed67621267e /sys/geom
parentab49f7fcefb753c5edff5e360bee0a35de9c27d7 (diff)
downloadFreeBSD-src-dd1aaed4176a17e2aa5cc19f2b08672164b4f8e6.zip
FreeBSD-src-dd1aaed4176a17e2aa5cc19f2b08672164b4f8e6.tar.gz
Drop a memory-corruption debugging test-tool.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom.h4
-rw-r--r--sys/geom/geom_subr.c13
2 files changed, 0 insertions, 17 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 70579b0..aed9498 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -98,14 +98,12 @@ struct g_class {
*/
LIST_ENTRY(g_class) class;
LIST_HEAD(,g_geom) geom;
- u_int protect;
};
/*
* The g_geom is an instance of a g_class.
*/
struct g_geom {
- u_int protect;
char *name;
struct g_class *class;
LIST_ENTRY(g_geom) geom;
@@ -141,7 +139,6 @@ struct g_bioq {
*/
struct g_consumer {
- u_int protect;
struct g_geom *geom;
LIST_ENTRY(g_consumer) consumer;
struct g_provider *provider;
@@ -156,7 +153,6 @@ struct g_consumer {
* A g_provider is a "logical disk".
*/
struct g_provider {
- u_int protect;
char *name;
LIST_ENTRY(g_provider) provider;
struct g_geom *geom;
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index ec35f9e..3489c33 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -209,7 +209,6 @@ g_new_geomf(struct g_class *mp, const char *fmt, ...)
va_end(ap);
sbuf_finish(sb);
gp = g_malloc(sizeof *gp, M_WAITOK | M_ZERO);
- gp->protect = 0x020016601;
gp->name = g_malloc(sbuf_len(sb) + 1, M_WAITOK | M_ZERO);
gp->class = mp;
gp->rank = 1;
@@ -290,7 +289,6 @@ g_new_consumer(struct g_geom *gp)
gp->name, gp->class->name));
cp = g_malloc(sizeof *cp, M_WAITOK | M_ZERO);
- cp->protect = 0x020016602;
cp->geom = gp;
cp->stat = devstat_new_entry(cp, -1, 0, DEVSTAT_ALL_SUPPORTED,
DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX);
@@ -361,7 +359,6 @@ g_new_providerf(struct g_geom *gp, const char *fmt, ...)
va_end(ap);
sbuf_finish(sb);
pp = g_malloc(sizeof *pp + sbuf_len(sb) + 1, M_WAITOK | M_ZERO);
- pp->protect = 0x020016603;
pp->name = (char *)(pp + 1);
strcpy(pp->name, sbuf_data(sb));
sbuf_delete(sb);
@@ -797,24 +794,14 @@ g_sanity(void const *ptr)
return;
LIST_FOREACH(mp, &g_classes, class) {
KASSERT(mp != ptr, ("Ptr is live class"));
- KASSERT(mp->protect == 0x20016600,
- ("corrupt class %p %x", mp, mp->protect));
LIST_FOREACH(gp, &mp->geom, geom) {
KASSERT(gp != ptr, ("Ptr is live geom"));
- KASSERT(gp->protect == 0x20016601,
- ("corrupt geom, %p %x", gp, gp->protect));
KASSERT(gp->name != ptr, ("Ptr is live geom's name"));
LIST_FOREACH(cp, &gp->consumer, consumer) {
KASSERT(cp != ptr, ("Ptr is live consumer"));
- KASSERT(cp->protect == 0x20016602,
- ("corrupt consumer %p %x",
- cp, cp->protect));
}
LIST_FOREACH(pp, &gp->provider, provider) {
KASSERT(pp != ptr, ("Ptr is live provider"));
- KASSERT(pp->protect == 0x20016603,
- ("corrupt provider %p %x",
- pp, pp->protect));
}
}
}
OpenPOWER on IntegriCloud