diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-09-14 21:38:35 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-09-14 21:38:35 +0000 |
commit | 9348f83b49e40511454a5d2a6697910d9cc9de02 (patch) | |
tree | b2d705f7cd1c7354bd190b536c27e25e8449fce0 /sys/geom/geom_slice.c | |
parent | e4de2de4329b31dda4eb1bea592e862571c817ff (diff) | |
download | FreeBSD-src-9348f83b49e40511454a5d2a6697910d9cc9de02.zip FreeBSD-src-9348f83b49e40511454a5d2a6697910d9cc9de02.tar.gz |
Fix so that when a slice or a partition is removed through g_slice_config(),
it is destroyed in GEOM, in addition to being removed from /dev.
Before this patch, if you applied a new MBR which deleted a slice,
the deleted slice would not be in /dev, but it would still appear
in kern.geom.conftxt and kern.geom.confxml, which would confused
the diskPartitionEditor in sysinstall.
Submitted by: pjd
Tested by: pjd, rodrigc
MFC after: 1 week
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index e69db3b..e618430 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -339,6 +339,7 @@ g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length return (0); if (bootverbose) printf("GEOM: Deconfigure %s\n", pp->name); + pp->flags |= G_PF_WITHER; g_orphan_provider(pp, ENXIO); gsl->provider = NULL; gsp->nprovider--; |