Next | Internals of ext2fs | 10 |
Operations like read, mount, and so on are performed differently for different kinds of file systems
The code for reading a ramdisk is very different than for reading a real disk
The kernel deals with this by creating an abstraction layer
Typically, the top layer will have a list of filesystem types
Each filesystem type will have a virtual method table
When you load in a kernel module:
The module provides functions for the file system operations
And it registers the method table in a global kernel data structure
Usually a linked list
There is a similar organization further down to handle different kinds of physical devices
It's something like object-oriented programming
With filesystem types as objects
Sometimes a method will be 'inherited' from the generic version
Next | Copyright © 2001 M. J. Dominus |