When it comes to file systems, LinuxÂ® is the Swiss Army knife of operating systems. Linux supports a large number of file systems, from journaling to clustering to cryptographic. Linux is a wonderful platform for using standard and more exotic file systems and also for developing file systems. This article explores the virtual file system (VFS)â€”sometimes called the virtual filesystem switchâ€”in the Linux kernel and then reviews some of the major structures that tie file systems together.
The Linux file system architecture is an interesting example of abstracting complexity. Using a common set of API functions, a large variety of file systems can be supported on a large variety of storage devices. Take, for example, the
read function call, which allows some number of bytes to be read from a given file descriptor. The
read function is unaware of file system types, such as ext3 or NFS. It is also unaware of the particular storage medium upon which the file system is mounted, such as AT Attachment Packet Interface (ATAPI) disk, Serial-Attached SCSI (SAS) disk, or Serial Advanced Technology Attachment (SATA) disk. Yet, when the
read function is called for an open file, the data is returned as expected. This article explores how this is done and investigates the major structures of the Linux file system layer.
More on this from IBM developerworks.
Related: Anatomy of the Linux Kernel