Cool. How about writing a file system of your own??
Yes, you heard it right :^)
There is a
project called
FUSE (File system in Userspace) which helps one to write
their own file system completely in user space. What this means is,
that you can implement a file system on top of the FUSE layer. While it itself runs on top of the conventional well designed file systems available, like ext2, ext3, VFS, etc.
FUSE
itself also consists of user mode part and kernel mode part. One does
not need to worry about the kernel mode part of it. The kernel mode part internally
handles which file system underneath to map a syscall to. It provides a common single interface to a system call from each file system. For example, say there is a system call to write a file to disk, it maybe implemented differently in ext2 and ext3 with different interfaces as well. FUSE will provide a common write syscall interface for the user file system. Now, the user can create a file system on top of fuse and implement the write syscall as provided by FUSE. Based on kind of file to be written (whether it is located in an ext2 file system managed space or ext3, etc.), FUSE will multiplex the write call and call the syscall from appropriate filesystem underneath.
Well, there are tutorials available to write your own file system on top of FUSE:
1.
http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/2.
http://www.ibm.com/developerworks/linux/library/l-fuse/
I am working on writing a filesystem on top of FUSE myself right now. Let me know, if anyone's interested in this.
Aastha.