sys/dev/md/md.c wrong execution order of md_takeroot() and md_preloaded() ?

From: Luigi Rizzo <rizzo_at_icir.org>
Date: Sun, 21 Mar 2004 10:57:04 -0800
Hi,
in trying to use a picobsd version based on current, i noticed that
the preloaded mfs image is not recognised, but you can boot from it
if you specify ufs:md0 at the mountroot> prompt.

A few printf()s in md.c showed that md_takeroot() is run before
md_preloaded().

Unless i am missing something in the kernel config files,
it is not clear to me why this occurs -- the order numbers in
the SYSINIT line at the end of md.c look correct, and larger
than the one used in DECLARE_GEOM_CLASS, so I have no idea
on whay the order is not the correct one.

Anyways, one possible fix is to call md_takeroot() near the
end of md_preloaded(), which is the only place where mdrootready
can be set. This would also remove the need for the SYSINIT
at the end of the file, and overall simplifies the code.
It still leaves the question unsolved though...

ideas ?

	cheers
	luigi
Received on Sun Mar 21 2004 - 09:57:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:48 UTC