Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2016 19:36:25 +0000 (UTC)
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296574 - in head/sys: dev/md modules/md
Message-ID:  <201603091936.u29JaPS8035203@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sobomax
Date: Wed Mar  9 19:36:25 2016
New Revision: 296574
URL: https://svnweb.freebsd.org/changeset/base/296574

Log:
  For the MD_ROOT option don't inject /dev/md0 as root dev when ROOTDEVNAME
  is defined explicitly. It's kinda pointless and results in extra step in
  boot sequence which is not really needed, i.e.:
  
  md0: Embedded image 1331200 bytes at 0x8038b7b4
  Trying to mount root from ufs:/dev/md0 []...
  Mounting from ufs:/dev/md0 failed with error 22.
  Trying to mount root from ufs:md0.uzip []...
  warning: no time-of-day clock registered, system time will not be set accurately
  start_init: trying /sbin/init

Modified:
  head/sys/dev/md/md.c
  head/sys/modules/md/Makefile

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Wed Mar  9 19:06:46 2016	(r296573)
+++ head/sys/dev/md/md.c	Wed Mar  9 19:36:25 2016	(r296574)
@@ -58,6 +58,7 @@
  * From: src/sys/dev/vn/vn.c,v 1.122 2000/12/16 16:06:03
  */
 
+#include "opt_rootdevname.h"
 #include "opt_geom.h"
 #include "opt_md.h"
 
@@ -1732,7 +1733,7 @@ md_preloaded(u_char *image, size_t lengt
 	sc->pl_ptr = image;
 	sc->pl_len = length;
 	sc->start = mdstart_preload;
-#ifdef MD_ROOT
+#if defined(MD_ROOT) && !defined(ROOTDEVNAME)
 	if (sc->unit == 0)
 		rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0";
 #endif

Modified: head/sys/modules/md/Makefile
==============================================================================
--- head/sys/modules/md/Makefile	Wed Mar  9 19:06:46 2016	(r296573)
+++ head/sys/modules/md/Makefile	Wed Mar  9 19:36:25 2016	(r296574)
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../dev/md
 
 KMOD=	geom_md
-SRCS=	md.c opt_md.h opt_geom.h vnode_if.h
+SRCS=	md.c opt_md.h opt_geom.h opt_rootdevname.h vnode_if.h
 
 .include <bsd.kmod.mk>



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