wakedelay.diff

fgudin, 05/21/2012 03:33 PM

Download (1.57 KB)

View differences:

sys/boot/dloader/loader.conf
94 94
#kern.ipc.nmbufs=""		# Set the maximum number of mbufs
95 95
#kern.vm.kmem.size=""		# Sets the size of kernel memory (bytes)
96 96
#net.inet.tcp.tcbhashsize=""	# Set the value of TCBHASHSIZE
97
#vfs.root.wakedelay=""		# Delay in seconds before trying to mount the root
97 98
#vfs.root.mountfrom=""		# Specify root partition in a way the
98 99
				# kernel understands. You can specify a semicolon
99 100
				# separated device list which will be tried.
sys/kern/vfs_conf.c
112 112
	cdev_t	save_rootdev = rootdev;
113 113
	int	i;
114 114
	int	dummy;
115
	static int wakedelay = 2;
115 116
	
116 117
	/*
117 118
	 * Make sure all disk devices created so far have also been probed,
......
121 122
	 * Messages can fly around here so get good synchronization
122 123
	 * coverage.
123 124
	 *
124
	 * XXX - Delay an additional 2 seconds to help drivers which pickup
125
	 * XXX - Delay some more (default: 2s) to help drivers which pickup
125 126
	 *       devices asynchronously and are not caught by CAM's initial
126 127
	 *	 probe.
127 128
	 */
128 129
	sync_devs();
129
	tsleep(&dummy, 0, "syncer", hz*2);
130

  
130
	TUNABLE_INT("vfs.root.wakedelay", &wakedelay);
131
	tsleep(&dummy, 0, "syncer", wakedelay*hz);
131 132

  
132 133
	/* 
133 134
	 * The root filesystem information is compiled in, and we are