designing driver / fs interface
Posted: Fri Nov 24, 2006 4:51 pm
Hi
Documents regarding file system interface, device interface designing are harder to find. I have been looking through various sources and finally i think i understand how they work. Still when considering design of a new interface, its seems really impossible because driver interface, file system interface and virtual file system are closely related.
Basic framework required to implement driver interface, fs interface are present in the kernel. So how to begin the basic design? mobius source seems quite harder to understand and i dont want to confuse myself with asynchronous I/O. Will it be harder to modify the design to support asynchronous I/O.
I am having some idea about how to begin.
1. Try to write some mount kind of function to store the mount points and to load the file system driver.
2. The fs driver will return fs object and these fs objects have to be stored in some structures. mount points should have related informations such as the driver, device.
3. Then path traversal function and functions to construct a directory structure
4. General Read and write functions which unpacks the path and calls the appropriate driver.
5. the driver should query the device. So device open, read, write functions must be implemented. Storing devices and device information in some ordered way.
At this point we will have a hardly finished io interface.
After this we should begin to write drivers for some standard devices and filesystems.
Is vfs a separate file system (as in case of mobius) or will the requests pass through the vfs. I have implemented a simpler driver interface similar to one of Therx, (much simpler type) ,Since i wrote kernel in assembly,it was a better choice. Since this kernel is written in C now, i would like to design a rather complex one.
Documents regarding file system interface, device interface designing are harder to find. I have been looking through various sources and finally i think i understand how they work. Still when considering design of a new interface, its seems really impossible because driver interface, file system interface and virtual file system are closely related.
Basic framework required to implement driver interface, fs interface are present in the kernel. So how to begin the basic design? mobius source seems quite harder to understand and i dont want to confuse myself with asynchronous I/O. Will it be harder to modify the design to support asynchronous I/O.
I am having some idea about how to begin.
1. Try to write some mount kind of function to store the mount points and to load the file system driver.
2. The fs driver will return fs object and these fs objects have to be stored in some structures. mount points should have related informations such as the driver, device.
3. Then path traversal function and functions to construct a directory structure
4. General Read and write functions which unpacks the path and calls the appropriate driver.
5. the driver should query the device. So device open, read, write functions must be implemented. Storing devices and device information in some ordered way.
At this point we will have a hardly finished io interface.
After this we should begin to write drivers for some standard devices and filesystems.
Is vfs a separate file system (as in case of mobius) or will the requests pass through the vfs. I have implemented a simpler driver interface similar to one of Therx, (much simpler type) ,Since i wrote kernel in assembly,it was a better choice. Since this kernel is written in C now, i would like to design a rather complex one.