Another reply I had sent to Chris directly.
Your executive summary is correct. The other wrinkle is that in
indirect blocks that are not embedded in inodes there is a 16 byte
header embedded in the indirect block. As you note this makes the
fan-out at each level 510 instead of 512.
John Edwards
> -----Original Message-----
> From: Chris Thompson [mailto:cet1@cus.cam.ac.uk]
> Sent: Wednesday, July 13, 2005 4:14 PM
> To: toasters(a)mathworks.com
> Subject: Moving to flexible volumes increases number of index blocks
>
> It turns out that moving files from traditional volumes to
> flexible volumes makes them "grow", in the sense that they
> have more index blocks, as accounted in "ls -s" output, and
> charged against quotas. I think it's a bit sneaky of NetApp
> to have done this without mentioning it in their conversion
> documents.
>
> Executive summary: disk block addresses in inodes and in index
> blocks have changed from 4-byte to 8-byte objects. (That's
> conjecture, of course, but it seems to explain the observed
> effects.)
>
> Files <= 64 bytes use no blocks (that is unchanged).
> Files <= 32 KB (used to be 64 KB) use ceil(size/4KB) data
> blocks only, no index blocks.
> Files up to c. 2 MB (used to be 4 MB) use ceil(size/4KB)
> data blocks and one 4 KB index block
> Files up to c. 4 MB (used to be 8 MB) use ceil(size/4KB)
> data blocks and two 4 KB index blocks
> ...
>
> The main expansion effect comes from files in the 32KB+1 to
> 64KB size range, where the extra index block is a significant
> proportion of the total.
>
> Has anyone worked out the new formulae in nit-picking detail?
> I say "c. 2 MB" above because the transition actually occurs
> a few blocks before 2 MB: I think there may be some overhead
> in the index blocks so that not quite 512 addresses will fit
> in them.
>
> --
> Chris Thompson
> Email: cet1(a)cam.ac.uk