diff options
author | phk <phk@FreeBSD.org> | 2003-05-02 06:42:59 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-02 06:42:59 +0000 |
commit | 055cf65eb1d06904d69d4b58914213644ad8cb0d (patch) | |
tree | bb8126af9ed3864ba67d3f80bced0b3ac8d831ee /sys/geom/geom_subr.c | |
parent | 9bb7fb74d1c16b096bf1753ef0429c85eb933304 (diff) | |
download | FreeBSD-src-055cf65eb1d06904d69d4b58914213644ad8cb0d.zip FreeBSD-src-055cf65eb1d06904d69d4b58914213644ad8cb0d.tar.gz |
Back out all the stuff that didn't belong in the last commit.
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r-- | sys/geom/geom_subr.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index ce2d876..d45dd2b 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -237,9 +237,7 @@ g_new_provider_event(void *arg, int flag) struct g_class *mp; struct g_provider *pp; struct g_consumer *cp; - struct g_geom *gp; int i; - u_long l1, l2; g_topology_assert(); if (flag == EV_CANCEL) @@ -256,12 +254,7 @@ g_new_provider_event(void *arg, int flag) i = 0; if (!i) continue; - l1 = M_GEOM[0].ks_memuse; - gp = mp->taste(mp, pp, 0); - l2 = M_GEOM[0].ks_memuse; - if (l1 != l2) - printf("%s %p %lu %lu -> %lu\n", - mp->name, gp, l1, l2, l2 - l1); + mp->taste(mp, pp, 0); g_topology_assert(); } } @@ -602,10 +595,20 @@ g_std_done(struct bio *bp) void g_std_spoiled(struct g_consumer *cp) { + struct g_geom *gp; + struct g_provider *pp; g_trace(G_T_TOPOLOGY, "g_std_spoiled(%p)", cp); g_topology_assert(); - g_wither_geom(cp->geom, ENXIO); + g_detach(cp); + gp = cp->geom; + LIST_FOREACH(pp, &gp->provider, provider) + g_orphan_provider(pp, ENXIO); + g_destroy_consumer(cp); + if (LIST_EMPTY(&gp->provider) && LIST_EMPTY(&gp->consumer)) + g_destroy_geom(gp); + else + gp->flags |= G_GEOM_WITHER; } /* |