Subject: Re: newfs: determining file system parameters
To: David Laight <david@l8s.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/20/2003 16:12:55
--sClP8c1IaQxyux9v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Oct 18, 2003 at 08:32:14AM +0100, David Laight wrote:
>=20
> But why should these values be stored in the disklabel, why not just
> pass them as parameters to newfs?
Because the disklabel is the only data store that exists above the fs.
> 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).
As before, what if you don't have a superblock anymore? :-)
Yes, it's rare, but we don't have a "find superblock" tool. Also, we need=
=20
some way to guard against incorrect data (like how do we not get confused=
=20
if we have a file on the fs that is itself a file system image? ;-) .
> 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.
Uhm, who gave us this redefinition mess?
Take care,
Bill
--sClP8c1IaQxyux9v
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQE/lGv3Wz+3JHUci9cRAuObAJ0TfOnkiTgzf2KwbRVTDtmF96wLCwCfUXM0
iXVfC9VTI1RvUKe66eoNYNU=
=EUQS
-----END PGP SIGNATURE-----
--sClP8c1IaQxyux9v--