summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2011-11-11 12:28:38 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2011-11-11 12:28:38 +0000
commitde02d48056772427ee26140d54d49415d3d38925 (patch)
tree8668f25801ef72028aeeaedb079b2cd09712175c /sys
parent4f7b859b9b3145d39035ec279d51b342c904e88b (diff)
When setting up a bootable softraid volume, do not try to save the boot
blocks or boot loader to chunks that are not online. ok mikeb@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index c2791904662..72d3f9f53dd 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.252 2011/11/08 18:02:37 krw Exp $ */
+/* $OpenBSD: softraid.c,v 1.253 2011/11/11 12:28:37 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -3444,6 +3444,10 @@ sr_ioctl_installboot(struct sr_softc *sc, struct bioc_installboot *bb)
for (i = 0; i < sd->sd_meta->ssdi.ssd_chunk_no; i++) {
chunk = sd->sd_vol.sv_chunks[i];
+ if (chunk->src_meta.scm_status != BIOC_SDONLINE &&
+ chunk->src_meta.scm_status != BIOC_SDREBUILD)
+ continue;
+
if (i < SR_MAX_BOOT_DISKS)
bcopy(chunk->src_duid, &sbm->sbm_boot_duid[i],
sizeof(sbm->sbm_boot_duid[i]));