summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2009-05-06 19:06:28 +0000
committerlulf <lulf@FreeBSD.org>2009-05-06 19:06:28 +0000
commitbb7cc8f64c9b61abf025167f00a85403e7598f3f (patch)
treec3e09b4324da06a2b480638d4b25cb8412406c6e /sys/geom
parentc2e31af67ea934f122ac84235cf4c359100fef1e (diff)
downloadFreeBSD-src-bb7cc8f64c9b61abf025167f00a85403e7598f3f.zip
FreeBSD-src-bb7cc8f64c9b61abf025167f00a85403e7598f3f.tar.gz
- Check if any plexes are doing internal maintenance before removing them.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/vinum/geom_vinum_rm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/geom/vinum/geom_vinum_rm.c b/sys/geom/vinum/geom_vinum_rm.c
index 2b1d36b..fa56bc3 100644
--- a/sys/geom/vinum/geom_vinum_rm.c
+++ b/sys/geom/vinum/geom_vinum_rm.c
@@ -172,6 +172,13 @@ gv_resetconfig(struct gv_softc *sc)
return (GV_ERR_ISBUSY);
}
}
+
+ /* Make sure nothing is going on internally. */
+ LIST_FOREACH_SAFE(p, &sc->plexes, plex, p2) {
+ if (p->flags & (GV_PLEX_REBUILDING | GV_PLEX_GROWING))
+ return (GV_ERR_ISBUSY);
+ }
+
/* Then if not, we remove everything. */
LIST_FOREACH_SAFE(s, &sc->subdisks, sd, s2)
gv_rm_sd(sc, s);
OpenPOWER on IntegriCloud