[issue1463] Mountroot before drives are initialized

Matthew Dillon dillon at apollo.backplane.com
Fri Sep 4 18:10:57 PDT 2009


:Hasso Tepper <hasso at estpak.ee> added the comment:
:
:I have the same issue and also using ciss(4) (HP Proliant DL360 G6). Vanill=
:a=20
:kernel fails 100% here to mount root from harddisk, but with kern.disk_debu=
:g=3D1=20
:it succeeds.

    If Alex doesn't come up with something in the next week or so we will
    add a straight-up delay before mountroot.

    In fact, could you test that a straight out delay before mountroot works?
    Here's a patch.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>

diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c
index a159afc..8bdea67 100644
--- a/sys/kern/vfs_conf.c
+++ b/sys/kern/vfs_conf.c
@@ -109,8 +109,9 @@ SYSINIT(mountroot, SI_SUB_MOUNT_ROOT, SI_ORDER_SECOND, vfs_mountroot, NULL);
 static void
 vfs_mountroot(void *junk)
 {
-	int	i;
 	cdev_t	save_rootdev = rootdev;
+	int	i;
+	int	dummy;
 	
 	/*
 	 * Make sure all disk devices created so far have also been probed,
@@ -121,6 +122,8 @@ vfs_mountroot(void *junk)
 	 * coverage.
 	 */
 	sync_devs();
+	tsleep(&dummy, 0, "syncer", hz*2);
+
 
 	/* 
 	 * The root filesystem information is compiled in, and we are





More information about the Bugs mailing list