Data structures in VFS
VFS uses several data structures to implement generic abstraction methods for all filesystems and provides the filesystem interface to user-space programs. These structures ensure a certain amount of commonality between the design and operations of filesystems. One important point to remember is that all the methods defined by VFS are not enforced upon filesystems. Yes, the filesystems should adhere to the structures defined in VFS and build upon them to ensure commonality among them. But there might be a lot of methods and fields in these structures that are not applicable to a particular filesystem. In such cases, filesystems stick to the relevant fields as per their design and leave out the surplus information. As we’re going to explain common VFS data structures, it is imperative that we look at the relevant code segments in the kernel for some clarification. Nevertheless, I’ve tried my best to present the material in a generic way so that most...