Linux: Linux VFS Documentation

Submitted by Kedar Sovani
on December 31, 2007 - 8:37am

This is a good way to start the new year!

For a long time now I have been planning to write up a documentation on Linux VFS. There are quite a few documents available on the topic, but my aim is to try and present the reasoning behind why things are the way they are. Many documents say what the "vfsmount" structure is, but very few say, why was the structure introduced, and what problem does it really solve (Discussed in a previous new article here).

This document is an attempt to address that. I have been spending bits and pieces on it since a long time now. It is far from being complete. Nonetheless, here it is in an as-is format.

http://linuxvfs.googlepages.com/linuxvfs.html

Hopefully I can find time to actively contribute towards this in the coming year.

If you have any suggestions/comments/corrections/documentations, please mail them to me at:
kedars --- at --- gmail --- com

How do VFS structure map to different file systems?

Anonymous (not verified)
on
January 2, 2008 - 2:33pm

Hi Kedar,

Thanks for starting that document. What I found interesting is that the Linux VFS structures seem very close to the Linux "native" ext file systems, with super block, inode, direntry, etc. Do you know how this maps onto other file systems that are structured differently? For example, FAT file systems do not have an inode as such. What do they put into the inode structure?

Thanks,
Daniel

Re: How do VFS structure map to different file systems?

on
January 3, 2008 - 2:37am

Different filesystems have the flexibility of defining their own inode structure. Typically, one of the member of this inode structure is the vfs_inode (VFS's generic inode structure). The filesystems can store whatever they want in their own version of the inode. Usually it is the attributes of the file/directory and mechanisms to find data blocks for that file.

E.g. In case of FAT, since it is a linked allocation, the inode would probably store the attributes and a pointer to the first link in the FAT chain.

HTH,
Kedar.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.