summaryrefslogtreecommitdiffstats
path: root/sys/geom/mirror
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-10-14 07:55:29 +0000
committerpjd <pjd@FreeBSD.org>2004-10-14 07:55:29 +0000
commitae8741cdf47d8a8579de263e2bb61e0f4401e1df (patch)
tree8b93c8b0022d194a80579779f30c5a4ed99bee0e /sys/geom/mirror
parentc06dbb041524f92cefecce8b2e7112fa5ecef66d (diff)
downloadFreeBSD-src-ae8741cdf47d8a8579de263e2bb61e0f4401e1df.zip
FreeBSD-src-ae8741cdf47d8a8579de263e2bb61e0f4401e1df.tar.gz
Ehh. Introduce a hack: Wait for 3 seconds, so GEOM is able to give us
providers for tasting. Before this hack, race below is possible: SI_SUB_RAID (no not-fully-configured geoms, so don't block) GEOM tasting (now geoms are created) SI_SUB_MOUNT_ROOT (if root file system is placed on a mirror, it is possible that this mirror is not fully configured yet) There is a lot of work to do to avoid such hacks and I need a working solution before 5.3, sorry. Reported by: John Hay <jhay@icomtek.csir.co.za>
Diffstat (limited to 'sys/geom/mirror')
-rw-r--r--sys/geom/mirror/g_mirror.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 9c023a1..3f79e16 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2727,6 +2727,11 @@ g_mirror_rootwait(void)
{
/*
+ * HACK: Wait for GEOM, because g_mirror_rootwait() can be called,
+ * HACK: before we get providers for tasting.
+ */
+ tsleep(&g_mirror_class, PRIBIO, "mroot", hz * 3);
+ /*
* Wait for mirrors in degraded state.
*/
for (;;) {
OpenPOWER on IntegriCloud