summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid1.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-01-21 10:25:26 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-01-21 10:25:26 +0000
commit79b41125644787c0b0fd7170b58998168fffec77 (patch)
tree033da6f51226d0edd544a1cd3f2dbae2d6db3023 /sys/dev/softraid_raid1.c
parent05d9a537c8d7c71e9a54ce621c206dbc3c6ddf67 (diff)
Order the volume state transitions by state value.
Diffstat (limited to 'sys/dev/softraid_raid1.c')
-rw-r--r--sys/dev/softraid_raid1.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index fc0af76e9e8..5b9242e954e 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.54 2013/11/01 17:36:19 krw Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.55 2014/01/21 10:25:25 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -261,12 +261,11 @@ sr_raid1_set_vol_state(struct sr_discipline *sd)
/* XXX this might be a little too much */
goto die;
- case BIOC_SVSCRUB:
+ case BIOC_SVDEGRADED:
switch (new_state) {
- case BIOC_SVONLINE:
case BIOC_SVOFFLINE:
- case BIOC_SVDEGRADED:
- case BIOC_SVSCRUB: /* can go to same state */
+ case BIOC_SVREBUILD:
+ case BIOC_SVDEGRADED: /* can go to the same state */
break;
default:
goto die;
@@ -284,23 +283,24 @@ sr_raid1_set_vol_state(struct sr_discipline *sd)
}
break;
- case BIOC_SVREBUILD:
+ case BIOC_SVSCRUB:
switch (new_state) {
case BIOC_SVONLINE:
case BIOC_SVOFFLINE:
case BIOC_SVDEGRADED:
- case BIOC_SVREBUILD: /* can go to the same state */
+ case BIOC_SVSCRUB: /* can go to same state */
break;
default:
goto die;
}
break;
- case BIOC_SVDEGRADED:
+ case BIOC_SVREBUILD:
switch (new_state) {
+ case BIOC_SVONLINE:
case BIOC_SVOFFLINE:
- case BIOC_SVREBUILD:
- case BIOC_SVDEGRADED: /* can go to the same state */
+ case BIOC_SVDEGRADED:
+ case BIOC_SVREBUILD: /* can go to the same state */
break;
default:
goto die;