Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 2007 18:10:26 -0800
From:      Nate Lawson <nate@root.org>
To:        Ken Smith <kensmith@cse.Buffalo.EDU>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/sysinstall cdrom.c
Message-ID:  <45DE4D12.20906@root.org>
In-Reply-To: <1172176388.91228.19.camel@opus.cse.buffalo.edu>
References:  <200702222029.l1MKTrOX079236@repoman.freebsd.org> <1172176388.91228.19.camel@opus.cse.buffalo.edu>

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



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