Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!cbmvax!andy From: andy@cbmvax.UUCP (Andy Finkel) Newsgroups: comp.sys.amiga Subject: Re: Hard Disk Driver Help Wanted Message-ID: <8590@cbmvax.UUCP> Date: 16 Nov 89 17:09:13 GMT References: <40676@wlbr.IMSD.CONTEL.COM> Reply-To: andy@cbmvax.UUCP (Andy Finkel) Organization: Commodore Technology, West Chester, PA Lines: 44 In article <40676@wlbr.IMSD.CONTEL.COM> steve@mickey.imsd.contel.com (Steve Childress) writes: >Need help with Amiga DOS Disk Driver .... >Along comes 1.3. > >When I user 1.3's FORMAT for FFS, I note that it calls the driver to >format each track, then reads that track. The 1.1 and 1.2 formatters >did that too. However, when that "verify" CMD_READ yields an error >due to a flawed sector, my driver returns an error, as usual. The >formatter then aborts, saying "BAD DISK, TRY ANOTHER"!!! > >Am I missing something? Isn't the formatter supposed to recover from >these read errors by marking that block as USED in the sector allocation >map, or some such strategy? (It doesn't seem to matter WHICH sector is bad.) Nope; our model has been that the driver hides the details of bad blocks from the filesystem. The filesystem has no bad block remapping logic. In 2090 and A590/A2091 drivers, the bad block logic is in the drivers. (Note that in a SCSI only driver, the bad block logic can become fairly simple, since many SCSI drives support a 'Remap Block' command). The Format program is an AmigaDOS filesystem format program; it expects the driver to hide bad blocks from it; Until 1.3 you could format a pizza and not have it notice errors. >Do I *HAVE* to have a DISK PREP program which does a low level format >prior to running CBM's FORMAT program? I didn't in 1.1 and 1.2. No; but your driver has to handle the low level bad block mapping. If your driver doesn't support bad block mapping, and its a preformatted drive, you might as well just format QUICK. Only if the root block and the boot block are bad will format complain. But you are playing a game of chance. Sooner or later you'll get a grown defect on the drive. -- andy finkel {uunet|rutgers|amiga}!cbmvax!andy Commodore-Amiga, Inc. "It's impossible to multitask in less than 4 meg." Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.