From nobody@FreeBSD.org  Thu Oct 25 17:37:48 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C75C261D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Oct 2012 17:37:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id AF04A8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Oct 2012 17:37:48 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9PHbmk1025958
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Oct 2012 17:37:48 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9PHbmEs025957;
	Thu, 25 Oct 2012 17:37:48 GMT
	(envelope-from nobody)
Message-Id: <201210251737.q9PHbmEs025957@red.freebsd.org>
Date: Thu, 25 Oct 2012 17:37:48 GMT
From: Harald von Fellenberg <productnews@hvf.ch>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Followup to amd64/170677: FreeBSD 9.x does not boot if 2 hard disks are on system
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         173078
>Category:       amd64
>Synopsis:       Re: amd64/170677: FreeBSD 9.x does not boot if 2 hard disks are on system
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-amd64
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 25 17:40:00 UTC 2012
>Closed-Date:    Mon Dec 03 04:53:14 UTC 2012
>Last-Modified:  Mon Dec 03 04:53:14 UTC 2012
>Originator:     Harald von Fellenberg
>Release:        FreeBSD 9.1-RC1
>Organization:
>Environment:
FreeBSD orion-freebsd91.von-fellenberg.ch 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Followup to my earlies bug report amd64/170677.

I instrumented the loader code (in /usr/src/sys/boot) with various
printf's to see where the delay occurs. Here are my findings:

1. in /usr/src/sys/boot/common/devopen.c around line 47:

    /* point to device-specific data so that device open can use it */
    f->f_devdata = dev;
    result = dev->d_dev->dv_open(f, dev);
    if (result != 0) {

the call to dev->d_dev->dv_open(f, dev) always blocks for around 15
seconds, both for existing and non-existing files. Why is that?

2. the loader opens about 19 existing files (among them the kernel at
/boot/kernel/kernel five times!) and tries to open about 18 non-existing
files (among them /boot/kernel/linker.hints twice). Each open adds about
15 seconds, so the complete time to get to the loader menu is around 10
to 11 minutes.

I do not know why this delay occurs, why it only occurs when 2 HDs are
present, and how it can be avoided. every help to solve this riddle is
appreciated!
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Dec 3 04:52:01 UTC 2012 
State-Changed-Why:  
Misfiled followup to amd64/170677; content migrated. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173078 
>Unformatted:
