diff options
author | Ulf Lilleengen <lulf@FreeBSD.org> | 2009-05-06 19:06:28 +0000 |
---|---|---|
committer | Ulf Lilleengen <lulf@FreeBSD.org> | 2009-05-06 19:06:28 +0000 |
commit | 11c4adc49ee75df1fc038f56e59a19ce9255808e (patch) | |
tree | c3e09b4324da06a2b480638d4b25cb8412406c6e /sys/geom/vinum | |
parent | 5a0fa8531c4a8abd3422a0bfc4a699d34a473491 (diff) | |
download | src-11c4adc49ee75df1fc038f56e59a19ce9255808e.tar.gz src-11c4adc49ee75df1fc038f56e59a19ce9255808e.zip |
- Check if any plexes are doing internal maintenance before removing them.
Notes
Notes:
svn path=/head/; revision=191854
Diffstat (limited to 'sys/geom/vinum')
-rw-r--r-- | sys/geom/vinum/geom_vinum_rm.c | 7 |
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 2b1d36b2fb40..fa56bc302c13 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); |