Subject: Re: newfs: determining file system parameters
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 10/21/2003 10:35:46
> > > That's a reason to stop paying attention to the disklabel value, not a
> > > reason to break -c.
> > 
> > Ah - someone changed it to "max. blocks per group".
> > It is currently ignored (for compatibility).
> 
> Compat with what?

It seemed better to ignore the argument, than to use is for a related,
but different, function.

> > -C <count> could be used for the minimum number of cylinder groups.
> 
> I think we should have something that retains the old usage.
> 
> Mainly since in addition to creating a file system (when it makes most 
> sense to crank cpg up as far as it will go), newfs is also useful (with 
> -N) for printing out alternative superblock numbers. In _that_ usage, we 
> want a specific c/g number.

The version of newfs that appeared with the FFSv2 code just divides
the number of sectors into 'cylinder groups'.  This division is not
based on the reported physical geometry of the disk.
(This also removes the data areas that remembered information for each
cylinder withing a cylinder group, making it difficult to create
cylinder groups with large numbers of cylinders.)

I did change the code to put an average number of blocks in each
group, rather than having a lot of maximal sized cylinder groups and 
small one at the end.  The previous version was broken for large disks
(when there are more cylinder groups than blocks per cylinder group).

For large disks FFS really needs to allow:
	(#fragents + #inodes) > 8 * blocksize
so that you don't need thousands of cylinder groups.
(The first cylinder group can be full of the cyclinder group summary!)

	David

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