Submit #2373 » wakedelay.diff
| sys/boot/dloader/loader.conf | ||
|---|---|---|
|
#kern.ipc.nmbufs="" # Set the maximum number of mbufs
|
||
|
#kern.vm.kmem.size="" # Sets the size of kernel memory (bytes)
|
||
|
#net.inet.tcp.tcbhashsize="" # Set the value of TCBHASHSIZE
|
||
|
#vfs.root.wakedelay="" # Delay in seconds before trying to mount the root
|
||
|
#vfs.root.mountfrom="" # Specify root partition in a way the
|
||
|
# kernel understands. You can specify a semicolon
|
||
|
# separated device list which will be tried.
|
||
| sys/kern/vfs_conf.c | ||
|---|---|---|
|
cdev_t save_rootdev = rootdev;
|
||
|
int i;
|
||
|
int dummy;
|
||
|
static int wakedelay = 2;
|
||
|
|
||
|
/*
|
||
|
* Make sure all disk devices created so far have also been probed,
|
||
| ... | ... | |
|
* Messages can fly around here so get good synchronization
|
||
|
* coverage.
|
||
|
*
|
||
|
* XXX - Delay an additional 2 seconds to help drivers which pickup
|
||
|
* XXX - Delay some more (default: 2s) to help drivers which pickup
|
||
|
* devices asynchronously and are not caught by CAM's initial
|
||
|
* probe.
|
||
|
*/
|
||
|
sync_devs();
|
||
|
tsleep(&dummy, 0, "syncer", hz*2);
|
||
|
TUNABLE_INT("vfs.root.wakedelay", &wakedelay);
|
||
|
tsleep(&dummy, 0, "syncer", wakedelay*hz);
|
||
|
/*
|
||
|
* The root filesystem information is compiled in, and we are
|
||