Skip to main content
Engineering LibreTexts

04-A.5: Linux Virtual File System

  • Page ID
    26836
  • VFS

    A virtual file system (VFS) is an abstract layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way. A VFS can, for example, be used to access local and network storage devices transparently without the client application noticing the difference. It can be used to bridge the differences in Windows, classic Mac OS/macOS and Unix filesystems, so that applications can access files on local file systems of those types without having to know what type of file system they are accessing.

    A VFS specifies an interface "contract" between the kernel and an actual file system. This contract specifies how the kernel communicates to the VFS, and the kernel does not worry about how to actually communicate to the various file systems that the VFS communicates with. Therefore, it is easy to add support for new file system types to the kernel simply by fulfilling the contract.

    If a new release of one of the file systems includes changes, then the VFS might also have to be modified for that specific file system type. It is better to require changes in the VFS than in the kernel. Kernel changes can have a much larger impact, so it is better to change the VFS than it is to change the kernel.

    In a similar manner, if a change that is made to the kernel impacts the communications between the kernel and the VFS, then, again, we can change the VFS, and not make code changes to the kernel. This greatly simplifies the maintenance of the kernel, as it doesn't have to be modified every time one of the supported file systems is changed.

    Adapted from:
    "Virtual file system" by Multiple ContributorsWikipedia is licensed under CC BY-SA 3.0

    • Was this article helpful?