Introduce a per provider wither flag

This commit is contained in:
Poul-Henning Kamp 2003-10-06 09:05:44 +00:00
parent bdc0dba68b
commit 90916ef730
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120851
2 changed files with 3 additions and 0 deletions

View file

@ -170,6 +170,7 @@ struct g_provider {
u_int nstart, nend;
u_int flags;
#define G_PF_CANDELETE 0x1
#define G_PF_WITHER 0x2
};
/* geom_dev.c */

View file

@ -524,6 +524,8 @@ g_detach(struct g_consumer *cp)
cp->provider = NULL;
if (pp->geom->flags & G_GEOM_WITHER)
g_wither_geom(pp->geom, 0);
else if (pp->flags & G_PF_WITHER)
g_destroy_provider(pp);
redo_rank(cp->geom);
}