From owner-freebsd-current@FreeBSD.ORG Sun Mar 21 10:57:05 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03BC916A4CE for ; Sun, 21 Mar 2004 10:57:05 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E80CC43D2D for ; Sun, 21 Mar 2004 10:57:04 -0800 (PST) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i2LIv4RS025963 for ; Sun, 21 Mar 2004 10:57:04 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i2LIv4Sc025962 for current@freebsd.org; Sun, 21 Mar 2004 10:57:04 -0800 (PST) (envelope-from rizzo) Date: Sun, 21 Mar 2004 10:57:04 -0800 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20040321105704.C25835@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Subject: sys/dev/md/md.c wrong execution order of md_takeroot() and md_preloaded() ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 18:57:05 -0000 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