diff options
author | phk <phk@FreeBSD.org> | 2004-10-29 09:19:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-29 09:19:03 +0000 |
commit | 269b7a298a7c7c987a4664c180765ddb92182b08 (patch) | |
tree | f3882fa2c0d37b0cb19fda1266950c4f3ea001ea /sys/geom/geom_subr.c | |
parent | 29ecb2fede5c67acaa301cbea4d140c1d1f8aaf9 (diff) | |
download | FreeBSD-src-269b7a298a7c7c987a4664c180765ddb92182b08.zip FreeBSD-src-269b7a298a7c7c987a4664c180765ddb92182b08.tar.gz |
Add g_wither_geom_close() function.
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r-- | sys/geom/geom_subr.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 506f919..dc2c8ad 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -315,6 +315,23 @@ g_wither_geom(struct g_geom *gp, int error) } /* + * This function is called (repeatedly) until the has withered away. + */ +void +g_wither_geom_close(struct g_geom *gp, int error) +{ + struct g_consumer *cp; + + g_topology_assert(); + G_VALID_GEOM(gp); + g_trace(G_T_TOPOLOGY, "g_wither_geom_close(%p(%s))", gp, gp->name); + LIST_FOREACH(cp, &gp->consumer, consumer) + if (cp->acr || cp->acw || cp->ace) + g_access(cp, -cp->acr, -cp->acw, -cp->ace); + g_wither_geom(gp, error); +} + +/* * This function is called (repeatedly) until we cant wash away more * withered bits at present. Return value contains two bits. Bit 0 * set means "withering stuff we can't wash now", bit 1 means "call |