cvs commit: src/usr.sbin/sysinstall cdrom.c

Nate Lawson nate at root.org
Fri Feb 23 02:10:32 UTC 2007


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


More information about the cvs-all mailing list