diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-08-26 01:59:23 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-08-26 01:59:23 +0000 |
commit | 03a68ae1940ec8a00d35f2c4c612f71b637ae0f3 (patch) | |
tree | 712c7a07ead5de556bae4b9cdc4abc96b132cd0c | |
parent | fcddbfebee7e8247eb45a180a1a788a244c07ea7 (diff) |
move attach mpath before any hardware. the benefits being:
- the mpath hooks path drivers call dont have to parse autoconf
structures to tell if mpath may attach in the future. it now either
has already attached or never will, which is simpler to check.
- i can get rid of the global mpath target array by moving it into
the mpath softc because of the above.
- makes reasoning about state transitions (especially around when
to attach) when groups of paths are implemented a lot simpler
the only real caveat is dmesg feng shui may be ruined. i can come
back and look at this after i move mpath itself forward though.
discussed with deraadt@ miod@
ok todd@ matthew@ krw@
-rw-r--r-- | sys/kern/init_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index a7b4c43c512..b90b4c8a844 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.189 2013/06/03 16:55:22 guenther Exp $ */ +/* $OpenBSD: init_main.c,v 1.190 2013/08/26 01:59:22 dlg Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -346,6 +346,11 @@ main(void *framep) /* Initialize the interface/address trees */ ifinit(); +#if NMPATH > 0 + /* Attach mpath before hardware */ + config_rootfound("mpath", NULL); +#endif + /* Configure the devices */ cpu_configure(); @@ -456,9 +461,6 @@ main(void *framep) dostartuphooks(); -#if NMPATH > 0 - config_rootfound("mpath", NULL); -#endif #if NVSCSI > 0 config_rootfound("vscsi", NULL); #endif |