diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-01-21 10:25:26 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-01-21 10:25:26 +0000 |
commit | 79b41125644787c0b0fd7170b58998168fffec77 (patch) | |
tree | 033da6f51226d0edd544a1cd3f2dbae2d6db3023 /sys | |
parent | 05d9a537c8d7c71e9a54ce621c206dbc3c6ddf67 (diff) |
Order the volume state transitions by state value.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/softraid_raid1.c | 20 | ||||
-rw-r--r-- | sys/dev/softraid_raid5.c | 24 | ||||
-rw-r--r-- | sys/dev/softraid_raid6.c | 20 |
3 files changed, 32 insertions, 32 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; diff --git a/sys/dev/softraid_raid5.c b/sys/dev/softraid_raid5.c index 121694f6564..49dd8150cd8 100644 --- a/sys/dev/softraid_raid5.c +++ b/sys/dev/softraid_raid5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid5.c,v 1.7 2014/01/21 10:21:05 jsing Exp $ */ +/* $OpenBSD: softraid_raid5.c,v 1.8 2014/01/21 10:25:25 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -284,46 +284,46 @@ sr_raid5_set_vol_state(struct sr_discipline *sd) /* XXX this might be a little too much */ goto die; - case BIOC_SVBUILDING: + case BIOC_SVDEGRADED: switch (new_state) { - case BIOC_SVONLINE: case BIOC_SVOFFLINE: - case BIOC_SVBUILDING: /* can go to the same state */ + case BIOC_SVREBUILD: + case BIOC_SVDEGRADED: /* can go to the same state */ break; default: goto die; } break; - case BIOC_SVSCRUB: + case BIOC_SVBUILDING: switch (new_state) { case BIOC_SVONLINE: case BIOC_SVOFFLINE: - case BIOC_SVDEGRADED: - case BIOC_SVSCRUB: /* can go to same state */ + case BIOC_SVBUILDING: /* can go to the same state */ break; default: goto die; } 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; diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index 5cfb22dedb7..301e7f49513 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.58 2014/01/18 09:33:53 jsing Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.59 2014/01/21 10:25:25 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -305,12 +305,11 @@ sr_raid6_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; @@ -328,23 +327,24 @@ sr_raid6_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; |