Add g_wither_geom_close() function.

This commit is contained in:
Poul-Henning Kamp 2004-10-29 09:19:03 +00:00
parent cd71c41476
commit 725419af56
2 changed files with 18 additions and 0 deletions

View File

@ -236,6 +236,7 @@ int g_std_access(struct g_provider *pp, int dr, int dw, int de);
void g_std_done(struct bio *bp);
void g_std_spoiled(struct g_consumer *cp);
void g_wither_geom(struct g_geom *gp, int error);
void g_wither_geom_close(struct g_geom *gp, int error);
#ifdef DIAGNOSTIC
int g_valid_obj(void const *ptr);

View File

@ -314,6 +314,23 @@ g_wither_geom(struct g_geom *gp, int error)
g_do_wither();
}
/*
* 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