Add g_wither_geom_close() function.
This commit is contained in:
parent
cd71c41476
commit
725419af56
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user