*BSD News Article 22480


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!world!mv!k8lt.ampr.org!k8lt.ampr.org!glg
From: glg@k8lt.ampr.org (Gary L. Grebus)
Subject: Re: NetBSD 0.9 won't read PTF CD-ROM
Organization: Mostly disorganized
References: <CEu567.2wI@festival.ed.ac.uk> <29ho9a$3ja@agate.berkeley.edu>
Nntp-Posting-Host: localhost.k8lt.ampr.org
Message-ID: <1993Oct17.033332.11627@k8lt.ampr.org>
Sender: news@k8lt.ampr.org (USENET news)
Date: Sun, 17 Oct 93 03:33:32 GMT
Lines: 60

In article <29ho9a$3ja@agate.berkeley.edu>, cuccia@remarque.berkeley.edu (Nick Cuccia) writes:
|> I've mentioned this a number of times on the net.  It's not just with the PTF
|> cd; it happens with the InfoMagic cd that FTP software gave out at last year's
|> Interop.  This problem dates back to 386bsd 0.1; since I don't have a FreeBSD
|> system, so I'll leave it to somebody who does to determine whether the bug is
|> still there.
|> 
|> The problem is that files on ISO 9660 CDs can be accessed once mounted,
|> provided their inode number is less than some limit (it appears to be 81920,
|> but I can't tell for sure; doing an 'ls -iR' on a mounted CD's root should
|> give you an idea of where that limit is--it will list some dirs with inodes
|> > 81920, but not traverse them).
|> 

I fixed a couple of problems in 386BSD 0.1 pk 0.2.4 which produced similar 
symptoms.  Dunno if this applies to any of {Free|Net}BSD.  Basically, the isofs
code and vnode code didn't agree on the disk.  Here are the diffs:

*** cd.c.ORIG	Tue Aug  3 22:28:35 1993
--- cd.c	Thu Aug  5 22:31:33 1993
***************
*** 975,981 ****
  
  	cd->disklabel.d_npartitions = 1;
  	 cd->disklabel.d_partitions[0].p_offset = 0;
! 	 cd->disklabel.d_partitions[0].p_size = cd->params.disksize;
  	 cd->disklabel.d_partitions[0].p_fstype = 9;
  
  	cd->disklabel.d_magic = DISKMAGIC;
--- 975,983 ----
  
  	cd->disklabel.d_npartitions = 1;
  	 cd->disklabel.d_partitions[0].p_offset = 0;
! /* GLG - the fake partition size has to be in units of DEV_BSIZE */
! 	 cd->disklabel.d_partitions[0].p_size =
! 	   cd->params.disksize * (cd->params.blksize / DEV_BSIZE);
  	 cd->disklabel.d_partitions[0].p_fstype = 9;
  
  	cd->disklabel.d_magic = DISKMAGIC;
***************
*** 1383,1388 ****
--- 1385,1395 ----
  		printf("closing cd%d part %d\n",unit,part);
  	cd_data[unit].partflags[part] &= ~CDOPEN;
  	cd_data[unit].openparts &= ~(1 << part);
+ 
+ 	/* Force reread of label after a a close.  At minimum this
+ 	   forces a re-read if the drive was empty at boot time. */
+ /*GLG*/	cd_data[unit].flags &= ~(CDVALID | CDHAVELABEL);
+ 
         	cd_prevent_unit(unit,PR_ALLOW,SCSI_SILENT);
  	return(0);
  }


-- 
Gary L. Grebus, 16 North Mason Rd., Brookline, NH  03033-2452
Home:  glg@k8lt.ampr.org  (decvax!balrog!glg)
Work:  grebus@isis1.enet.dec.com
Ham Packet: K8LT @ WA1PHY.MA