diff options
author | 2009-07-31 15:23:02 +0000 | |
---|---|---|
committer | 2009-07-31 15:23:02 +0000 | |
commit | b3362af7a3773a1f3d12c8e0db52ea5b29ca0270 (patch) | |
tree | 6cd272510df9699b7d32d175d684e98f4652c159 | |
parent | on error, just call unload() instead of doing all the actions that it (diff) | |
download | wireguard-openbsd-b3362af7a3773a1f3d12c8e0db52ea5b29ca0270.tar.xz wireguard-openbsd-b3362af7a3773a1f3d12c8e0db52ea5b29ca0270.zip |
raidp is degraded when n - 1 disks are online, not offline.
ok marco@
-rw-r--r-- | sys/dev/softraid_raidp.c | 6 |
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) |