Developing a filesystem
Hi,
As I anounced a couple of weeks ago, I'm studying how to build a new filesystem. I have taken a look at the ramfs and also read some documentation about.
Now I'm writing my own dummyfs (based on ramfs) to know how this works, but I'm having problems compiling it; I need to include the "linux/fs.h" header file to have access to some structures definitions (such as struct file_system_type), but this is giving me some errors. So I think that I have to integrate my code with the kernel sources to make it compile.
Therefore, my question is, is there any way to check wheter my code compiles or not without having to integrate it with the kernel code? If not, is there any tutorial to learn how to integrate a filesystem into the Linux kernel code?
Thanks you,
Signature · 1 line
Guillermo
Quoted 13 lines · Guillermo López Alejos
Hi,
As I anounced a couple of weeks ago, I'm studying how to build a new filesystem. I have taken a look at the ramfs and also read some documentation about.
Now I'm writing my own dummyfs (based on ramfs) to know how this works, but I'm having problems compiling it; I need to include the "
linux/fs.h" header file to have access to some structures definitions (such as structfile_system_type), but this is giving me some errors. So I think that I have to integrate my code with the kernel sources to make it compile.
Quoted 4 lines
Therefore, my question is, is there any way to check wheter my code compiles or not without having to integrate it with the kernel code? If not, is there any tutorial to learn how to integrate a filesystem into the Linux kernel code?
1. Example Makefile for an out-of-tree filesystem:
http://cvs.sourceforge.net/viewcvs.py/v9fs/linux-9p/Makefile?rev=2.0&view=auto
2. Putting it into the kernel:
cat fs/ramfs/Makefile
grep -i ramfs fs/Kconfig
Pekka
Quoted 6 lines · Guillermo López Alejos
Now I'm writing my own dummyfs (based on ramfs) to know how this works, but I'm having problems compiling it; I need to include the "
linux/fs.h" header file to have access to some structures definitions (such as structfile_system_type), but this is giving me some errors. So I think that I have to integrate my code with the kernel sources to make it compile.
Have a look at http://lwn.net/Articles/21823/ "Compiling external modules".
Erik
Signature · 2 lines
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands