Subject: Re: Addiind a new filesystem support
To: =?ISO-8859-1?Q?Ren=E9_Amirkhanian?= <>
From: John Franklin <>
List: tech-kern
Date: 05/04/2002 02:18:45
On Friday, May 3, 2002, at 12:20 PM, Ren=E9 Amirkhanian wrote:
> I want to implement my own filesystem, so I did a few research about =
> it is handled in the kernel and some kernel reading.. My thoughts,=20
> after my
> readings are:
> 1- how to declare my filesystem.. and how to check it is there?
>     I actually did a few changes already and compiled..
>     is there a way to enumerate kernel supported filesystems?

Start with defining the myfs_vfsops and myfs_vnode_entries structures. =20=

Nearly everything else will fall out of that.  See ffs_vnops.c and=20
ffs_vfsops.c for examples.

> 2- which utils should I write apart? mkfs_myfs and next mount_myfs
>     after kernel support added..

This entirely depends on the design for your filesystem.  These two are=20=

for the most part a given.  Once you have the filesystem almost working,=20=

you'll want to write a debug_myfs or a dump_myfs.  If you have tunable=20=

parameters, a tune_myfs may be appropriate.

> Those are the 2 parts bugging me for now, as I'm not sure yet, other =
> internals seem to come easily once the basis would be set, has anyone=20=

> got some
> hints??

In general I would suggest studying the FFS code as an example.  While=20=

NetBSD's FFS has gone beyond the original 4.4BSD's FFS, the basic=20
structure is still the same and it is well documented in Design &=20
Implementation of 4.4BSD book.  (You DO have a copy, right?)

Bon chance!

John Franklin
ICBM: 35=B043'56"N 78=B053'27"W