summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid1.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2009-06-24 12:06:01 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2009-06-24 12:06:01 +0000
commit86f30ce80562d95ae64e9a97f24e9133161d3c3f (patch)
tree4c36e2354c933a85b118b51aa1e01f345b31b3be /sys/dev/softraid_raid1.c
parent17a9c2cb31dc9e022ae56cd4a1e3d659fdf177c5 (diff)
Abort the current rebuild if the rebuild chunk disappears. Whilst here also
rename the abort flag so that it is more generalised. ok marco@
Diffstat (limited to 'sys/dev/softraid_raid1.c')
-rw-r--r--sys/dev/softraid_raid1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index 5ff1e6d666f..57227846341 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.15 2009/06/18 15:55:15 jsing Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.16 2009/06/24 12:06:00 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -163,7 +163,10 @@ sr_raid1_set_chunk_state(struct sr_discipline *sd, int c, int new_state)
case BIOC_SDREBUILD:
switch (new_state) {
case BIOC_SDONLINE:
+ break;
case BIOC_SDOFFLINE:
+ /* Abort rebuild since the rebuild chunk disappeared. */
+ sd->sd_reb_abort = 1;
break;
default:
goto die;