summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2009-06-24 12:08:16 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2009-06-24 12:08:16 +0000
commit4c4e676b49c9565d44d2622434615b391e083f33 (patch)
tree9604ae0a52ab3ecc3828448c986bbd1299cde365
parent86f30ce80562d95ae64e9a97f24e9133161d3c3f (diff)
Reset the rebuild counter when initiating a rebuild.
ok marco@
-rw-r--r--sys/dev/softraid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 98fc0b8bfb2..999e5341e6b 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.159 2009/06/24 12:06:00 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.160 2009/06/24 12:08:15 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -2016,6 +2016,9 @@ sr_rebuild_init(struct sr_discipline *sd, dev_t dev)
}
}
+ /* Reset rebuild counter since we rebuilding onto a new chunk. */
+ sd->sd_meta->ssd_rebuild = 0;
+
/* recreate metadata */
open = 0; /* leave dev open from here on out */
sd->sd_vol.sv_chunks[found]->src_dev_mm = dev;