summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum/geom_vinum_volume.c
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2004-06-16 14:41:04 +0000
committerle <le@FreeBSD.org>2004-06-16 14:41:04 +0000
commitc2c39c895678d3e7ac762a0370704c00a5f851bb (patch)
tree33a093d93d5d77276951b18f914832f20c2f0c48 /sys/geom/vinum/geom_vinum_volume.c
parentdf666606e40b3eceb25bbd6cedf1d5fb125047ca (diff)
downloadFreeBSD-src-c2c39c895678d3e7ac762a0370704c00a5f851bb.zip
FreeBSD-src-c2c39c895678d3e7ac762a0370704c00a5f851bb.tar.gz
Handle dead disks in a somewhat sane way.
Diffstat (limited to 'sys/geom/vinum/geom_vinum_volume.c')
-rw-r--r--sys/geom/vinum/geom_vinum_volume.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/vinum/geom_vinum_volume.c b/sys/geom/vinum/geom_vinum_volume.c
index c916af4..c39d1e4 100644
--- a/sys/geom/vinum/geom_vinum_volume.c
+++ b/sys/geom/vinum/geom_vinum_volume.c
@@ -46,6 +46,7 @@ static void
gv_volume_orphan(struct g_consumer *cp)
{
struct g_geom *gp;
+ struct gv_volume *v;
int error;
g_topology_assert();
@@ -60,7 +61,9 @@ gv_volume_orphan(struct g_consumer *cp)
g_destroy_consumer(cp);
if (!LIST_EMPTY(&gp->consumer))
return;
- g_free(gp->softc);
+ v = gp->softc;
+ v->geom = NULL;
+ gp->softc = NULL;
g_wither_geom(gp, error);
}
OpenPOWER on IntegriCloud