Linux.conf.au 2003 | Abstracts
Putting a filesystem into a device driverBioPaper Audio
For a while there was a freeze on assigning new major and minor numbers in the kernel, so developers had to use a different way to have a device driver interact with userspace. One of the ways this can be done is by embedding a filesystem into the device driver. This paper will show how this can be easily done for both the 2.4 and 2.5 kernel trees.
It will cover what the basic requirements for a filesystem are, how to create the internal kernel structures and register them properly, and how to create a filesystem that is contained within a removable module. It will also highlight the differences between the 2.4 and 2.5 kernel versions of the VFS layer, and how it can help do the main work for the driver. For drivers that only need to be in 2.5 and beyond, the driverfs filesystem will be discussed as an alternative to creating a separate filesystem. The new libfs code in the 2.5 tree will also be covered, as it can handle much of the grunt work in creating a ram based filesystem.
The original Tux penguin is copyright by Larry Ewing.
Linux is a trademark of Linus Torvalds.
© 2002 Linux Australia.