Subject: Re: newfs: determining file system parameters
To: Christian Limpach <chris@pin.lu>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/20/2003 09:47:16
--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Oct 18, 2003 at 12:19:50AM +0200, Christian Limpach wrote:
> On Fri, 17 Oct 2003 14:36:00 -0700 Bill Studenmund <wrstuden@netbsd.org> =
wrote:
>=20
> > Think about wedges. In a wedges-based world, we just have partitions.
> > This ioctl will be perfect for that. Adding it now makes it easier to=
=20
> > go to a wedges scenario.
> > Since there's more to all of this than just size, the ioctl has use. It
> > in fact is needed in the long run. :-)
>=20
> yes, but do you know right now everything you ever want to store in the
> disklabel or in the partition's metadata storage[1].  Assuming this is not
> limited to the disklabel format forever (and on some ports it isn't even
> now), the ioctl should handle arbitrary data, probably some kind of tagged
> data structure where newfs can lookup and modify the values it needs.  The
> data structure would also have to reflect which values can be stored in t=
he
> partition's metadata storage.

You're way over-engineering this. :-) All newfs needs is exactly what's in=
=20
struct partition now, with info from the static part of disklabel. I agree=
=20
we may need more stuff in the future, but let's wait until then for=20
implementing it.

struct partition has gotten us a good ways, I think it can get us farther.

> It would be nice to have such an ioctl for the problem at hand.  I think
> that adding the ioctl now is not a good idea:  with an ioctl which only
> handles specific partition information (be it only size or even struct
> partition), we'll have backward compatibility issues in the future.=20
> Afterall, there are other simple solutions for the problem at hand.
>=20
> [1] i.e. wherever you store the fs-type and cpg/sps in wedge world

Note that there will be two info stores. There will be whatever is on the=
=20
disk, and what's in the kernel. What is in the kernel will be just the=20
minimum needed, and the struct we talked about above will probably do it.=
=20
What is on the disk will depend on the partitioning scheme in use.

Take care,

Bill

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

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

iD8DBQE/lBGUWz+3JHUci9cRAhX2AJ9LBVxYTr3IyS5nI1EyN4WlbE+7pQCbBbUC
9AGP2Huil+64c03w7pcdYNo=
=6j06
-----END PGP SIGNATURE-----

--NzB8fVQJ5HfG6fxh--