Subject: Re: newfs: determining file system parameters
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 10/18/2003 08:32:14
> > > You missed the point. :-) The point is to make it so that _all_ the info,
> > > including saved block, fragment, and cpg value, are obtainable without 
> > > needing a disklabel. And also so that they can be updated w/o needing a 
> > > disklabel.
> > 
> > one possible concern is that this approach is very ffs-centric.
> 
> How so? i.e. who has this as a concern?
> 
> block, fragment, and cpg/sps are things newfs will read/update in the
> disklabel now. newfs has to figure out which partition to update, which 
> has implications with LVMs (like vinum's issues with it).

But why should these values be stored in the disklabel, why not just
pass them as parameters to newfs?

If you need to know the values for an existing filesystem, then ask the
filesystem.  That way you get the correct values (eg from the superblock).

newfs was recently changed (not by me) to ignore the cpg field from the
disklabel - because it might contain garbage and cause the generated
filesystem to have inappropriate parameters.  The value saved is also
not the cpg (since 'cylinder groups' are no longer aligned to cylinder
boundaries) but, IIRC, the bottom 8 bits of the number of cylinders.

	David

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