FreeBSD VFS Tutorial
c Hiten M. Pandya ([email protected])
http://people.FreeBSD.ORG/~hmp/vfstutorial Contents
1 Overview 1 Chapter 1
Overview
The goal of this article is to describe the most substantial and important compo- nent of the FreeBSD kernel, i.e. the file system layer, VFS. Variety of things are discussed herein, including Vnodes, Linux to BSD file system porting tips, file system types and various other small subsystems which work side-by-side with the file system stack.
The FreeBSD operating system can support multiple file-systems, that can be easily plugged in and stacked on each other if needed. As of this writing, FreeBSD supports over five file systems with a couple of more in the oven; this includes the Linux Ext2FS file system, Apple’s HFS+ file system, the popular MSDOS file system, its network counterpart CIFS and many others. To manage these file systems, some sort of logical and layered approach is needed, so that files from different file systems can be accessed without special calls existing for each at the high level. This is where the VFS kicks in. Such an abstract layering approach is called VFS, better known as the Vir- tual File System. VFS was developed by Sun Microsystems for simplifying co-residence of multiple file systems in one kernel; although the stacking approach is based upon John Heidemann’s framework [1]. Other file system frameworks similar to VFS exist in other operating systems, such as DEC’s Generic File System (GFS), Linux VFS (Sun’s derivation), IBM’s GPFS (Generic Parellel File System) and AT&T’s File System Switch (FSS). A comparison of various file system frameworks can be found in [2]. Bibliography
[1] John S. Heidemann and Gerald J. Popek. File-system development with stackable layers. ACM Transactions on Computer Systems, 12(1):58–89, 1994.
[2] Michael J. Karels and Marshall Kirk McKusick. Toward a compatible filesystem interface. In Proceedings of the European Unix User’s Group, page 15, 1986.