Virtual file system
This article includes a list of general references, but it lacks sufficient corresponding inline citations. (October 2009) |
Operating systems |
---|
Common features |
A virtual file system (VFS) or virtual filesystem switch is an abstract layer on top of a more concrete file system. The purpose of a VFS is to allow 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. It can be used to bridge the differences in Windows, classic Mac OS/macOS and Unix filesystems, so that applications can access files on local file systems of those types without having to know what type of file system they are accessing.
A VFS specifies an interface (or a "contract") between the kernel and a concrete file system. Therefore, it is easy to add support for new file system types 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 system support 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 concrete file system support built for a given release of the operating system would work with future versions of the operating system.
Implementations
One of the first virtual file system mechanisms on
Other Unix virtual file systems include the File System Switch in
The
, and macOS.In Microsoft Windows, virtual filesystems can also be implemented through userland
Single-file virtual file systems
Sometimes Virtual File System refers to a file or a group of files (not necessarily inside a concrete file system) that acts as a manageable container which should provide the functionality of a concrete file system through the usage of software. Examples of such containers are CBFS Storage or a
.The primary benefit for this type of file system is that it is centralized and easy to remove. A single-file virtual file system may include all the basic features expected of any file system (virtual or otherwise), but access to the internal structure of these file systems is often limited to programs specifically written to make use of the single-file virtual file system (instead of implementation through a driver allowing universal access). Another major drawback is that performance is relatively low when compared to other virtual file systems. Low performance is mostly due to the cost of shuffling virtual files when data is written or deleted from the virtual file system.
Implementation of single-file virtual filesystems
Direct examples of single-file virtual file systems include emulators, such as PCTask and WinUAE, which encapsulate not only the filesystem data but also emulated disk layout. This makes it easy to treat an OS installation like any other piece of software—transferring it with removable media or over the network.
PCTask
The
WinUAE
The
UAE could also treat a directory on the host filesystem (Windows, Linux, macOS, AmigaOS) as an Amiga filesystem.[4]
See also
- 9P (protocol) – a distributed file system protocol that maps directly to the VFS layer of Plan 9, making all file system access network-transparent
- Synthetic file system – a hierarchical interface to non-file objects that appear as if they were regular files in the tree of a disk-based file system
Notes
- ^ Emulation on Amiga Comparison between PCX and PCTask, Amiga PC emulators.
- ^ See also This article explaining how it works PCTask.
- ^ Help About WinUAE (See Hardfile section).
- ^ Help About WinUAE (See Add Directory section)
References
- ^ Werner Fischer; Georg Schönberger (2015-06-01). "Linux Storage Stack Diagram". Thomas-Krenn.AG. Retrieved 2015-06-08.
- ^ Kleiman, Steve R. (June 1986). "Vnodes: An Architecture for Multiple File System Types in Sun UNIX" (PDF). USENIX Summer. 86: 238–247. Archived from the original (PDF) on 2014-06-29. Retrieved 31 December 2016.
- Linux kernel's Virtual File System
- Rodriguez, R.; M. Koehler; R. Hyde (June 1986). "The Generic File System". Proceedings of the USENIX Summer Technical Conference. Atlanta, Georgia: USENIX Association. pp. 260–269.
- EUUG. pp. 481–496.
- Heidemann, John (1995). Stackable Design of File Systems (Technical report). UCLA. CSD-950032.
- The Linux VFS, Chapter 4 of Linux File Systems by ISBN 0-07-212955-7
- Chapter 12 of Understanding the Linux Kernel by Daniel P. Bovet, Marco Cesati (ISBN 0-596-00565-2
- The Linux VFS Model: Naming structure