diff options
author | le <le@FreeBSD.org> | 2006-03-30 14:01:25 +0000 |
---|---|---|
committer | le <le@FreeBSD.org> | 2006-03-30 14:01:25 +0000 |
commit | 148e4e97f6a72d5d47fc4da833170bd0aeb91c52 (patch) | |
tree | d19a280a99ea2e4b5d78e9da8ea03f61a14ab2f8 /sys/geom/vinum/geom_vinum_state.c | |
parent | aa075cf284edd2192e4a6c6f086e2ac9edb16656 (diff) | |
download | FreeBSD-src-148e4e97f6a72d5d47fc4da833170bd0aeb91c52.zip FreeBSD-src-148e4e97f6a72d5d47fc4da833170bd0aeb91c52.tar.gz |
Protect from creating striped and RAID5 plexes with unequally sized
subdisks.
Diffstat (limited to 'sys/geom/vinum/geom_vinum_state.c')
-rw-r--r-- | sys/geom/vinum/geom_vinum_state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/vinum/geom_vinum_state.c b/sys/geom/vinum/geom_vinum_state.c index 81e305a..549503f 100644 --- a/sys/geom/vinum/geom_vinum_state.c +++ b/sys/geom/vinum/geom_vinum_state.c @@ -340,6 +340,12 @@ gv_update_vol_state(struct gv_volume *v) KASSERT(v != NULL, ("gv_update_vol_state: NULL v")); + /* The volume can't be up without plexes. */ + if (v->plexcount == 0) { + v->state = GV_VOL_DOWN; + return; + } + LIST_FOREACH(p, &v->plexes, in_volume) { /* One of our plexes is accessible, and so are we. */ if (p->state > GV_PLEX_DEGRADED) { |