diff options
author | phk <phk@FreeBSD.org> | 2003-10-06 09:05:44 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-10-06 09:05:44 +0000 |
commit | dc1586f84392512a06c7e3401894f0325677ae3e (patch) | |
tree | 85caf7e82a0d35f2d1ccb8f95aafd9ab37e1521a /sys/geom | |
parent | d3d8c999a703cb0636eb2db4d4175641f28d0603 (diff) | |
download | FreeBSD-src-dc1586f84392512a06c7e3401894f0325677ae3e.zip FreeBSD-src-dc1586f84392512a06c7e3401894f0325677ae3e.tar.gz |
Introduce a per provider wither flag
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom.h | 1 | ||||
-rw-r--r-- | sys/geom/geom_subr.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 40ba390..c592773 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -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 */ diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index e05184f..4ec32cb 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.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); } |