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>
This commit is contained in:
pjd 2004-10-14 07:55:29 +00:00
parent c06dbb0415
commit ae8741cdf4

View File

@ -2726,6 +2726,11 @@ static void
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.
*/