[hfs-user] Index nodes of a catalog B-Tree

Entwicklung entwicklung@whengenibk.de
Mon, 11 Feb 2002 10:15:10 +0100

> Simon Bazley,
> Thanks for replying !
>  I managed to figure out what the problem was-  I had mentioned this in my
> previous email to the list.

> I have a question to which maybe you or someone from the list knows the
> answer -
> At the moment I'm wondering how to determine the number of index nodes
> needed for a catalog tree. I have determined the number of catalog nodes
> needed and my question is : Does every leaf node in the catalog-tree have
> be referenced in the index-nodes?
> In a broadly logical sense I would say that it has to ...since a leaf
> without an index in a 'real' tree would probably be like a leaf falling
> a branch in autumn :). The HFS reference (Inside Macintosh) has this
> of a sample B-Tree where a reference to every leaf-node is maintained in
> index nodes.
> But I came across a sample HFS-image (which is readable on my Mac) which
> shattered all my illusions since the root-node (the only index node in
> image) doesn't maintain references to all leaf nodes, only to a few of
> Does anyone from Apple (or others) maybe know how the index nodes are to
> built up i.e. to which leaf-nodes (if not to all) a reference has to
> necessarily be maintained ? I guess a Mac internally should be doing some
> kind of optimization to reduce the search-time in finding a
> but all I need to know is what I should take into account while
> my index-nodes to make the job easier for the Mac when an external
> HFS-volume is mounted.
> Would be grateful for any tips.
> Regards,
> Nandini Hengen
> ----- Original Message -----
> From: "Simon Bazley <sibaz@sibaz.com>" <simon@sibaz.com>
> To: "Entwicklung" <entwicklung@whengenibk.de>
> Cc: <hfs-user@lists.mars.org>
> Sent: Monday, February 11, 2002 2:41 AM
> Subject: Re: [hfs-user] Volume-Names in HFS
> > Have you checked Inside Macintosh Files to see what it says about the
> > record (assuming its an HFS volume) or the equivalent in the HFS+
> > (assuming its HFS+).  My understanding was that volume name was pretty
> > bullet proof.
> >
> > Simon
> >
> > On Thu, 7 Feb 2002, Entwicklung wrote:
> >
> > > Hello,
> > >         My HFS-Volume seems to be recognized if I give the Volume a
> with an odd no. of characters say "NEW" but fails to be recognized if the
> name is say "NAND_HFS". Does anybody know of a possible reason why this is
> happening ?
> > >
> > > I think this had something to do with the key length field. In my
case -
> if the volume name is even hence implying that the associated key does not
> end on an even byte boundary (where applicable), i byte is added for
> but the key-length and name length fields are maintained as before. In
> keys which have to be of size=maximum key length the padding with zeroes
> done in any case.
> > > Does anybody know if something else needs to be changed ?
> > >
> > > TIA,
> > > Nandini Hengen
> > >
> >