Re: Resource Fork as Extended Attributes
Re: Resource Fork as Extended Attributes
- Subject: Re: Resource Fork as Extended Attributes
- From: Mark Day <email@hidden>
- Date: Thu, 23 Jul 2009 09:35:47 -0700
On Jul 22, 2009, at 6:59 PM, shailesh jain wrote: On HFS Plus, the maximum EA size is based on the node size of the Attributes B-tree. By default, the node size is 8192, which results in a maximum EA size of just over 3800 bytes. Resource forks (where the EA name is "com.apple.ResourceFork") are actually stored as extents, and can be much larger.
Hmm. Atleast TN1150 seems to suggest that B-tree node size for Attributes file is 4KB (while for catalog file it is 8KB).
We should update that to indicate that the default in Mac OS X is 8 KiB. We already had a bug report about needing to update TN1150 for more information on how the Attributes B-tree works (once it was finally implemented in Mac OS X). I added a note to that bug report that we also need to update the default node size for the Attributes B-tree.
Thanks for pointing out the documentation bug. In any case, I was not able to calculate how EA size came down to ~3800 Bytes. (Is it that I am not supposed to look at or be concerned with other fields ?)
Given that the information isn't yet in TN1150, you'd have to resort to the source code. But it boils down to wanting to be able to fit two EA records (including both the name of the EA, and its contents) in a single leaf node. So that ~3800 number is 8192 minus per-node overhead minus two EA names, divided by two.
-Mark
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden