tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: allocating files with indirect blocks (was: choosing the file system block size)

>> For files large enough to need indirect blocks, (a) the size is
>> rounded up to the block size, not the frag size
> Why is that so?

I don't know why the FFS designers made that choice.  I've always
assumed it was for some kind of efficiency reason, but that is
speculation on my part.

If you mean, where in the code this is done, look at
sys/ufs/ffs/ffs_balloc.c; search for NDADDR.  I see two relevant tests
per FFS version (two in ffs_balloc_ufs1 and two in ffs_balloc_ufs2, or
only two total when I look at pre-FFSv2 code).

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index