From 05d9a537c8d7c71e9a54ce621c206dbc3c6ddf67 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Tue, 21 Jan 2014 10:21:06 +0000 Subject: Add missing states to the RAID 5 volume transitions. --- sys/dev/softraid_raid5.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys/dev/softraid_raid5.c') diff --git a/sys/dev/softraid_raid5.c b/sys/dev/softraid_raid5.c index 31c41000ef5..121694f6564 100644 --- a/sys/dev/softraid_raid5.c +++ b/sys/dev/softraid_raid5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid5.c,v 1.6 2014/01/21 03:15:55 jsing Exp $ */ +/* $OpenBSD: softraid_raid5.c,v 1.7 2014/01/21 10:21:05 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom * Copyright (c) 2009 Jordan Hargrave @@ -271,6 +271,7 @@ sr_raid5_set_vol_state(struct sr_discipline *sd) case BIOC_SVONLINE: switch (new_state) { case BIOC_SVONLINE: /* can go to same state */ + case BIOC_SVOFFLINE: case BIOC_SVDEGRADED: case BIOC_SVREBUILD: /* happens on boot */ break; @@ -283,6 +284,17 @@ sr_raid5_set_vol_state(struct sr_discipline *sd) /* XXX this might be a little too much */ goto die; + case BIOC_SVBUILDING: + switch (new_state) { + case BIOC_SVONLINE: + case BIOC_SVOFFLINE: + case BIOC_SVBUILDING: /* can go to the same state */ + break; + default: + goto die; + } + break; + case BIOC_SVSCRUB: switch (new_state) { case BIOC_SVONLINE: -- cgit v1.2.3