mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
- Check if any plexes are doing internal maintenance before removing them.
This commit is contained in:
parent
5a0fa8531c
commit
11c4adc49e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191854
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue