Re: Writing a new filesystem driver.

Kai Schulte (kai@eclipse.asta.uni-essen.de)
Sun, 13 Dec 1998 02:19:19 +0100


On Fri, 11 Dec 1998, Mike A. Harris wrote:

> Is there a SIMPLE filesystem implementation existing for Linux
> that may or may not be part of the official kernel?

You could take a look at romfs. It uses as little data as possible
and it's read-only. Or does anyone have an exaple that is even
more bare-bones, maybe?

> If anything it is closer to FAT than anything.

Hmm, not really. Don't you think the recursive next-block
pointers make it resemble a simple inode-fs? ;)

> Will my filesystem be available through the loopback driver? Or
> will I need to immediately implement a hardware driver for the
> real disk drive as well? (Something I plan on doing as well later
> on).

Very brave. I'd love to see that, but you may run into timing
problems with the current 'standard' disk drive interface.
Maybe we should write some kind of receive routine for the drive
that only reads data on an interrupt from the cia instead of
timing out :)

But even on an image mounted via loopback you'd want to start
out by doing 255-byte "block-read" and "block-write" and
building all the file- and inode-operations on top of that.
(The inode ops struct is going to have a lot of NULLs (no
mkdir, mknod, etc, so you can save some work ;)

> I don't completely
> understand the Linux VFS layer quite yet, and I'd like to have
> more info on it

Basically, all you need to do is provide the inode_operations
and file_operations structs for the vfs to call.

> and if necessary, I will tell the filesystem that I'm
> implementing, but I'd rather not yet...

No, just keep it a secret ;)

Kai

-
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/