Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!intercon!amanda@mermaid.intercon.com From: amanda@mermaid.intercon.com (Amanda Walker) Newsgroups: comp.sys.mac.programmer Subject: Re: HFS Esoterica question Message-ID: <1646@intercon.com> Date: 21 Dec 89 03:09:13 GMT References: <1631@intercon.com> <37421@apple.Apple.COM> Sender: news@intercon.com Reply-To: amanda@mermaid.intercon.com (Amanda Walker) Lines: 35 In article <37421@apple.Apple.COM>, keith@Apple.COM (Keith Rollin) writes: > The extents file is not guaranteed to be contiguous. It can be split up into > 3 extents of its own. Beyond that, I don't know what happens. Some sort of > system failure, I suppose. How reassuring :-). > However, I've never seen more than one extent, and > there is probably some sort of methematical reason why you'll never exceed the > 3 set aside for the extents file. I've never seen any that spans more than > even 1 extent. Well, I've poked around a little more, and it seems that the clump size for the extents file is set based on the number of allocation blocks on the volume. Since this number is fixed at the time the volume is formatted, and since the maximum size of the extents file is directly related to the number of allocation blocks (a fact which initially escaped me), it looks like the extents file will in fact never need more than one (or possibly three :-)) extents. Just in case, I'll write my code so that it handles up to three properly... Why do I care, you ask? Well, there are SCSI drivers in the world which do not reset the drive after a read error, and thus hang the File Manager in SCSIDispatch if you try and read a file containing a bad block. Since a partially scrogged disk is just the kind of thing you want to backup before you reformat or replace it :-), I've been examining ways to scan a volume's file structure as robustly as possible. Luckily, HFS isn't too bad as long as you understand B*-trees... Unfortunately, this is of more than hypothetical concern at the moment. Sigh. Amanda Walker InterCon Systems Corporation --