Virtual file system
From Free net encyclopedia
121a0012 (Talk | contribs)
/* References */ Add Heidemann citation; regularize two nearby citations.
Next diff →
Current revision
A Virtual file system (VFS) or Virtual filesystem switch is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow for client applications to access different types of concrete file systems in a uniform way. A VFS can for example be used to access local and network storage devices transparently without the client application noticing the difference. Or it can be used to bridge the differences in Windows, Mac OS and Unix filesystems, so that applications could access files on local file systems of those types without having to know what type of file system they're accessing.
A VFS specifies an interface (or a contract) between the kernel and a concrete file system. Therefore, it is easy to add new file systems to the kernel simply by fulfilling the contract. The terms of the contract might change incompatibly from release to release, which would require that concrete file systems be recompiled, and possibly modified before recompilation, to allow it to work with a new release of the operating system, or the supplier of the operating system might make only backward-compatible changes to the contract, so that a concrete file system built for a given release of the operating system would work with future versions of the operating system.
Contents |
Implementations
One of the first virtual file system mechanisms in Unix-like systems was the one introduced by Sun Microsystems in SunOS 2.0. It allowed UNIX system calls to access local UFS file systems and remote NFS file systems transparently. For this reason, UNIX vendors who licensed the NFS code from Sun often copied the design of Sun's VFS. Other file systems could be plugged into it as well: there was an implementation of the MS-DOS FAT file system developed at Sun that plugged into the SunOS VFS, although it wasn't shipped as a product until SunOS 4.1. The SunOS implementation was the basis of the VFS mechanism in System V Release 4.
John Heidemann developed a stacking VFS under SunOS 4.0 for the experimental Ficus file system. This design provided for code reuse among file system types with differing but similar semantics (e.g., an encrypting file system could reuse all of the naming and storage-management code of a non-encrypting file system). Heidemann adapted this work for use in 4.4BSD as a part of his thesis research; this implementation underpins the file system implementations in modern BSD derivatives including Mac OS X.
Other virtual file system mechanisms in UNIX-like systems include the File System Switch in System V Release 3, the Generic File System in Ultrix, and the VFS in Linux. In OS/2 and Microsoft Windows, the virtual file system mechanism is called the Installable File System.
References
- Put virtual filesystems to work
- Vnodes: An Architecture for Multiple File System Types in Sun UNIX
- The Linux Virtual File-system Layer
- Linux kernel's Virtual File System
- {{cite conference
| first = R. | last = Rodriguez | coauthors = M. Koehler; R. Hyde | year = 1986 | month = June | title = The Generic File System | booktitle = Proceedings of the USENIX Summer Technical Conference | publisher = USENIX Association | location = Atlanta, Georgia | pages = 260–269 }}
- {{cite conference
| first = M. | last = Karels | authorlink = Mike Karels | coauthors = M. K. McKusick | year = 1986 | month = September | title = Towards a Compatible File System Interface | booktitle = Proceedings of the European UNIX Users Group Meeting | publisher = EUUG | location = Manchester, England | pages = 481–496 }}
- Template:Techrep reference
- The Linux VFS, Chapter 4 of Linux File Systems by Moshe Bar (McGraw-Hill, 2001). ISBN 0072129557
- Chapter 12 of Understanding the Linux Kernel by Daniel P. Bovet, Marco Cesati (O'Reilly Media, 2005). ISBN 0596005652
See also
- 9P - Distributed file system protocol that maps directly to the Plan 9 from Bell Labs VFS layer making all file system access network transparent.
- Gnome VFS
- FUSE (Linux)
- Toronto Virtual File System, a VFS for OS/2 developed by IBM Toronto that allows mounting diverse filesystems under a common structure.