Best Way to Handle FS Driver Loading
Posted: Fri Mar 19, 2010 5:49 pm
Hello. I've been designing my OS for quite some time now, and was wondering what the best way to do this might be. You see, after my kernel loads, I need file system access to get to specialized drivers. I then need those file system drivers to determine which devices they control, and then mount to a "/vfs/dev/<storage-type-name>/<device-number>[/<partition-number>]" directory. E.g., /vfs/dev/hd/0/0; or /vfs/dev/rd/sdcard/0. The kernel, knowing that one of the storage device directories has changed, would then mount said storage device into the root directory (under a possibly different name). For example, an ext4 FS driver might load, determine that it controls /vfs/dev/hd/0/0 and take control of said block-device file. My kernel would then mount that to /hd0. But, I digress.
What I'm trying to get at is, in what order (and to a minimal extent, how) should my kernel load the file system drivers? Would it be wise to have a kernel initialization package module which contains a configuration file and a copy of a specific file system driver? (The configuration file would specify what device the rest of the drivers are stored on, and the file system driver in the package would be for said device.)
Everything after the part where the file system drivers are loaded is trivial. It's getting to that trivial part that I'm unsure of. I've thought up several methods to do so, but the example given above is the best one I've come up with thus far. So, I'm fairly interested in hearing what you guys have to say. I just want to write this system once, and not have to redesign it later.
Thanks in advance, all help and constructive criticism is appreciated.
Cheers,
-naota
What I'm trying to get at is, in what order (and to a minimal extent, how) should my kernel load the file system drivers? Would it be wise to have a kernel initialization package module which contains a configuration file and a copy of a specific file system driver? (The configuration file would specify what device the rest of the drivers are stored on, and the file system driver in the package would be for said device.)
Everything after the part where the file system drivers are loaded is trivial. It's getting to that trivial part that I'm unsure of. I've thought up several methods to do so, but the example given above is the best one I've come up with thus far. So, I'm fairly interested in hearing what you guys have to say. I just want to write this system once, and not have to redesign it later.

Thanks in advance, all help and constructive criticism is appreciated.
Cheers,
-naota