summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2009-07-31 15:23:03 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2009-07-31 15:23:03 +0000
commit5571d058b348039e9a4c920e93847ea19c2a4573 (patch)
tree124e38956dbbdf2c87e2dcd523964ffd93499e68 /sys/dev
parent339c66d4a0faeb891adbdecdcd53766094ff8717 (diff)
raidp is degraded when n - 1 disks are online, not offline.
ok marco@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid_raidp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index ae4ec8aae24..91174b64810 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.6 2009/06/20 13:00:44 marco Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.7 2009/07/31 15:23:02 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -242,10 +242,10 @@ sr_raidp_set_vol_state(struct sr_discipline *sd)
if (states[BIOC_SDONLINE] == nd)
new_state = BIOC_SVONLINE;
+ else if (states[BIOC_SDONLINE] == nd - 1)
+ new_state = BIOC_SVDEGRADED;
else if (states[BIOC_SDONLINE] < nd - 1)
new_state = BIOC_SVOFFLINE;
- else if (states[BIOC_SDOFFLINE] == nd - 1)
- new_state = BIOC_SVDEGRADED;
else if (states[BIOC_SDSCRUB] != 0)
new_state = BIOC_SVSCRUB;
else if (states[BIOC_SDREBUILD] != 0)