Summary
The flexibility of support for Linux filesystems is a direct result of an abstracted set of interfaces implemented by the VFS. In this chapter, we learned about the major data structures in the VFS and how they are all working together. The VFS uses several data structures to implement generic abstraction methods for the different native and non-native filesystems. The four most common structures are inodes, directory entries, file objects, and superblocks. These structures ensure commonality between the design and operations of different filesystems. Since the methods defined by the VFS are generic, it is not compulsory for filesystems to implement all of them, although the filesystems should adhere to the structures defined in the VFS and build upon them to ensure a generic interface is maintained.
In addition to filesystem abstractions, the VFS also provides a number of caches to improve the performance of filesystem operations, such as dentry and inode cache. We also...