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/21/2003 10:11:56
--uZ3hkaAS1mZxFaxD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 21, 2003 at 10:35:46AM +0100, David Laight wrote:
> > > > That's a reason to stop paying attention to the disklabel value, no=
t a
> > > > reason to break -c.
> > >=20
> > > Ah - someone changed it to "max. blocks per group".
> > > It is currently ignored (for compatibility).
> >=20
> > Compat with what?
>=20
> It seemed better to ignore the argument, than to use is for a related,
> but different, function.

Ahh I thought we'd changed -c to be compatible with something specific.

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

I was afraid this was the source of the difference...

> the number of sectors into 'cylinder groups'.  This division is not
> based on the reported physical geometry of the disk.

Ugh. While I think this is a great change, it's been done in a backwards-=
=20
incompat way. :-(

> (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.)
>=20
> 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=20
> small one at the end.  The previous version was broken for large disks
> (when there are more cylinder groups than blocks per cylinder group).
>=20
> 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!)

Take care,

Bill

--uZ3hkaAS1mZxFaxD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/lWjbWz+3JHUci9cRArPZAJ0SH6TymxEBq/6fQ4cbiMQzxBC+rgCaAiXV
rw5vcelg4N68FeXNLjWbybo=
=jcDl
-----END PGP SIGNATURE-----

--uZ3hkaAS1mZxFaxD--