summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2011-11-11 17:23:40 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2011-11-11 17:23:40 +0000
commit7e32234da5bb7f0962d492103007466beb22cad1 (patch)
tree19a835e58d441c2ca03bd21448b3f810787819f3 /sys
parentf7c296be2b29b35f7700f2e23b4a4e2f6eb9f051 (diff)
When rebuilding check the size of the replacement chunk against the
coerced size rather than the physical size of another chunk.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a5844964a1b..73421ceb131 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.254 2011/11/11 12:32:11 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.255 2011/11/11 17:23:39 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -2848,10 +2848,10 @@ sr_rebuild_init(struct sr_discipline *sd, dev_t dev, int hotspare)
BIOC_SDOFFLINE) {
found = c;
new = &sd->sd_vol.sv_chunks[c]->src_meta;
+ csize = new->scmi.scm_coerced_size;
if (c > 0)
break; /* roll at least once over the for */
} else {
- csize = sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_size;
old = &sd->sd_vol.sv_chunks[c]->src_meta;
if (found != -1)
break;