Virtual filesystem
In a system Linux, the virtual filesystem or VFS (for virtual filesystem or virtual filesystem switch ) is a software layer of the Noyau Linux making it possible to make coexist several Filesystem together in a transparent way for the program.
Role of the virtual filesystem
The virtual filesystem of linux proposes an interface of calls systems common to the programs for the various operations on the files.
The core then deals with making the redirection of the call system in a routine specific to the filing system targeted for the required operation.
Operation of the virtual filesystem
To propose a common interface and thus to propose a whole of calls systems commun run for the access to the files for different type of filing system, the core proposes a model of common file very near to the files of a native filing system linux such as ext2. This model is placed in memory, when that is necessary, in the form of 4 objects (structures and functions to modify them) which are the object superblock , the object file , the object dentry and the object Inode
The superblock object
This structure contains information relating to a filing system assembled such as the number and the size of the blocks, the type of filing system, the identifier of the peripheral on which it is assembled, etc It also contains a field containing the pointer which points on a structure containing the functions of the superblock.
The inode object
This structure contains primarily the contained informations in true the inodes of the filesystem, i.e. size, attribute of the inode, many bonds… etc
The file object
August 1st
The dentry object
August 1st
Access to the files
The access to the files is carried out by VFS thanks to the inodes. When the way of a file to be handled is transmitted to VFS by a user's program, VFS then traverses the disc, element by element; i.e. files and repertories. The parours stops when VFS finds the inode last element to be handled. At this time, VFS can then handle the data of the user's program. The force of VFS is due to the fact that it knows, according to the partition that it traverses, to dialog with a filesystem FAT, NTFS, Ext2, Ext3, ReiserFS or XFS.
See too
| Random links: | Alexandre Ribot | Feluettes de Les | War cry | Cinematographic test | Constraint of integrity | Day of the ANZAC | Nakula |