Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 2004 10:57:04 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        current@freebsd.org
Subject:   sys/dev/md/md.c wrong execution order of md_takeroot() and md_preloaded() ?
Message-ID:  <20040321105704.C25835@xorpc.icir.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040321105704.C25835>