Re: How to start to develop a filesystem ?

From: Tigran Aivazian (tigran@veritas.com)
Date: Fri Aug 11 2000 - 08:40:38 EST


On Fri, 11 Aug 2000 tdanis@canal-plus.fr wrote:

>
> Hello,
>
> Could someone point to information on how to develop a new filesystem ?
> Things to be avoided ? Sensible points (truncate ?), etc.
>

What, another one? Doesn't Linux already have all filesystems one can
imagine ? :)

Seriously though, the way to go is probably to print out sources of two
filesystems: ramfs (fs/ramfs/inode.c) and minix (fs/minix/*.c +
include/linux/minix*.h) and study their interaction with buffer cache and
page cache and VFS. If you are brave and are not afraid of huge complexity
of ext2 replace minix -> ext2 above.

How I wrote bfs - I just read fs/minix/*.c (you can notice it by reading
fs/bfs/*.c) and mimicked it wherever I could to get readonly version
working quickly. Then, the hard part was to understand how ->get_block()
method is supposed to work and implement the full write support. But bfs
is a very simple filesystem, for most cases you need a lot more things to
think about...

Regards,
Tigran

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:24 EST