Basic priciples
2. Virtual File System Switch(VFS)
-
VFS allows Linux to support different file systems
-
Concept
-
Virtual Filesystem Switch, or VFS , is a unified interface
between the Linux kernel and the filesystem code.
-
The most significant difference between the filesystems of
Linux and other operating systems.
-
Function
In Linux, all files are accessed through VFS. The kernel
"speaks" with the VFS layer. (See Figure 1) 3
Figure 1 The layers in the file system
The role of the VFS is:
-
Keep track of available filesystem types.
-
Associate (and disassociate) devices with instances of the
appropriate filesystem.
-
Do any reasonable generic processing for operations involving
files.
-
When filesystem-specific operations become necessary, vector
them to the filesystem in charge of the file, directory, or inode in question.
The Linux VFS is implemented so that access to its files
is as fast and efficient as possible. It must also make sure that the files
and their data are kept correctly.
[next]