On Friday, March 15, 2002, at 02:41 AM, Biswaroop Banerjee wrote:
vol.mdb.drXTClpSiz = vol.mdb.drNmAlBlks / 128 * vol.mdb.drAlBlkSiz;
That is making it 1/128 of the total volume size.
That is basically what Mac OS 9 uses, though Mac OS 9 also tries to limit the size to 4MB (which means that for volumes over 512 MB, the clump size will be 4 MB rounded up to a multiple of the allocation block size).
Can i make it equal to just clump size calculated for the Volume??
Depends on your volume's clump size.
For the extents B-tree in particular, you want to avoid making the clump size too small. The extents B-tree can't grow beyond 3 extents for HFS (8 extents for HFS Plus), so if the clump size is too small, and files (including the B-trees!) get too fragmented, you may be unable allocate space to files because the extents B-tree is too fragmented. Essentially, you'd get a "disk full" condition even when there is lots of free space on the volume.
When mastering read-only media, I'd set the clump size to one allocation block. And since you should be able to lay out the fork content contiguously, you can also make both of the B-trees the minimum possible size (meaning an extents B-tree with just a header node).
-Mark