tech-kern archive

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

Re: Allocating inodes (was: choosing the file system block size)



On Fri, May 18, 2012 at 02:42:37PM +0200, Edgar Fu? wrote:
> > possibly also relevant is that inode space is not available for ordinary
> > data storage even if the inodes in question are not being used.

> Oops, is that still true for FFSv2?

Yes.

> What does "dynamic inodes" mean, then?

Probably that FFSv2 doesn't initialise all the on-disk inode structures
until they are needed.
This significantly reduces the number of writes (and hence time) to
initialise a filesystem.

IIRC FFS has the following overheads per 'cylinder group':
- 8k for a copy of the superblock (+boot area in the first one).
- 1 filesystem-sized block for CG info and the per-cg inode and allocation
  maps. One bit per inode and 1 bit per fragment.
- space for all the inodes, 128 bytes each for FFSv1, 256 for FFSv2.

Although 'cylinder groups' were originally made up of logical cylinders
(with an array of per-cyclinder info), they are now just a big chunk of disk.
IIRC they are initialised as if they are a single cylinder (ie one copy
of the original per-cylinder info).

Since the per-cylinder allocation maps are constrained to fit in a single
fs block (FFSv2 should probably have removed this restriction!) a large
disk needs a lot of cylinder groups.
If you double the FS fragment and block size, you divide the number of
cylinder groups by 4 (the bits in the inode allocation map are usually
insignificant).
But note that 64k blocks (and maybe 32k as well) aren't bootable on i386/amd64.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index