From owner-cvs-all@FreeBSD.ORG Fri Feb 23 02:10:32 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FFEB16A404 for ; Fri, 23 Feb 2007 02:10:32 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id 30A1E13C481 for ; Fri, 23 Feb 2007 02:10:31 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 49021 invoked from network); 23 Feb 2007 02:10:31 -0000 Received: from ppp-71-139-18-69.dsl.snfc21.pacbell.net (HELO ?10.0.5.55?) (nate-mail@71.139.18.69) by root.org with ESMTPA; 23 Feb 2007 02:10:31 -0000 Message-ID: <45DE4D12.20906@root.org> Date: Thu, 22 Feb 2007 18:10:26 -0800 From: Nate Lawson User-Agent: Thunderbird 1.5.0.9 (X11/20070214) MIME-Version: 1.0 To: Ken Smith References: <200702222029.l1MKTrOX079236@repoman.freebsd.org> <1172176388.91228.19.camel@opus.cse.buffalo.edu> In-Reply-To: <1172176388.91228.19.camel@opus.cse.buffalo.edu> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/sysinstall cdrom.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2007 02:10:32 -0000 Ken Smith wrote: > On Thu, 2007-02-22 at 20:29 +0000, Ken Smith wrote: >> kensmith 2007-02-22 20:29:53 UTC >> >> FreeBSD src repository >> >> Modified files: >> usr.sbin/sysinstall cdrom.c >> Log: >> If floppies are used to boot the machine, the user lets the machine >> complete the boot and enter into sysinstall, and only then inserts >> a CD into the CDROM drive and tries to select that as the install >> media the first call to mount(2) generates EIO but the second call >> to mount(2) will succeed. This was 100% reproducible on 6.2-RELEASE, >> RELENG_6, and HEAD. If the user inserts the disc into the CDROM >> while the machine is booting off the floppies the first call to mount(2) >> succeeds with no problems. The problem was originally reported in >> PR #56952 against 5.1-CURRENT so it's been there for a while now. >> >> PR: bin/56952 >> MFC after: 2 weeks >> >> Revision Changes Path >> 1.55 +6 -1 src/usr.sbin/sysinstall/cdrom.c > > This is clearly a symptom of a deeper problem but I can't reproduce > this behavior under any other scenario I've tried (e.g. if you boot > a machine to single-user mode the first attempt at mounting a CD > doesn't fail...). It's only in this "floppy booted sysinstall" > environment I'm able to see the problem. The test machine has an > IDE CDROM drive, I don't know if this can be reproduced on a machine > that has a SCSI CDROM drive. > > It would be nice to fix the deeper problem instead of masking the symptom > but since this is such an obscure edge case and I can't seem to reproduce > the problem in any other environment I'm not sure what else to do. If > someone else can figure out what the deeper problem is I'll happily > back this out... As a guess, I'd say this may be a problem in atapi when the first IO is done with interrupts enabled. With a CD in the drive, GEOM tries to read it to see if it has a label and so any mount call happens after the EIO has been already seen by GEOM. I'd look there or in the GEOM error handling case for media not present. It might be caching an old state from the first read. -- Nate