mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
Introduce a per provider wither flag
This commit is contained in:
parent
bdc0dba68b
commit
90916ef730
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120851
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue