mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
When loading GEOM modules, we expect the actual load process to be done
by the time that kldload(8) returns. Satisfy that by making the GEOM module load event -- only when the kernel is !cold -- wait until the GEOM module init function has finished instead of returning immediately. This is the other half of fixing md(8) (actually, "mfs" in fstab(5)) that is similar to r1.128 of src/sys/dev/md/md.c. This bug would be why RAM disks would often fail on boot and the first call to mdconfig(8) would probably fail. pjd has ideas for not requiring kldload(8) to work synchronously for control devices that could make this obsolete. Silence on: -arch
This commit is contained in:
parent
00b5244e28
commit
6f299fa373
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136414
@ -195,7 +195,15 @@ g_modevent(module_t mod, int type, void *data)
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
g_trace(G_T_TOPOLOGY, "g_modevent(%s, LOAD)", hh->mp->name);
|
||||
g_post_event(g_load_class, hh, M_WAITOK, NULL);
|
||||
/*
|
||||
* Once the system is not cold, MOD_LOAD calls will be
|
||||
* from the userland and the g_event thread will be able
|
||||
* to acknowledge their completion.
|
||||
*/
|
||||
if (cold)
|
||||
g_post_event(g_load_class, hh, M_WAITOK, NULL);
|
||||
else
|
||||
g_waitfor_event(g_load_class, hh, M_WAITOK, NULL);
|
||||
error = 0;
|
||||
break;
|
||||
case MOD_UNLOAD:
|
||||
|
Loading…
Reference in New Issue
Block a user