Now we'll focus on how the VFS keeps track of the filesystems it is supposed to support. Two basic operations must be performed before making use of a filesystem: registration and mounting.
Registration is done either when the system boots or when the module implementing the filesystem is being loaded. Once a filesystem has been registered, its specific functions are available to the kernel, so that kind of filesystem can be mounted on the system's directory tree.
Each filesystem has its own root directory. The filesystem whose root directory is the root of the system's directory tree is called root filesystem. Other filesystems can be mounted on the system's directory tree: the directories on which they are inserted are called mount points.
Often, the user configures Linux to recognize all the filesystems needed when compiling the kernel for her system. But the code for a filesystem actually may either be included in the kernel image or dynamically loaded as a module (see Appendix B). The VFS must keep track of all filesystems whose code is currently included in the kernel. It does this by performing filesystem registrations.
Each registered filesystem is represented as a file_system_type object whose fields are illustrated in Table 12-7. All filesystem-type objects are inserted into a simply linked list. The file_systems variable points to the first item.