Professional Documents
Culture Documents
One of the most important features of Linux is its support for many different file systems. It
accomplishes this through the implementation a feature known as the Virtual File System
(VFS).
The Linux VFS supports more then 15 file systems. Among PC and server files systems are:
ext, ext2, NTFS, FAT16, FAT 32, HPFA (IBM’s High Performance File System).
Linux is similar to Unix in the sense that the separate file systems are not accessed by device
identifiers (such as a drive number or a drive name). They are combined into a single
hierarchical tree structure that represents the file system as one complete entity. All of the
different file systems, are mounted onto their own separate directory. This directory is known
as the mount directory or mount point.
The EXT2 file system is similar to many other file systems in the sense that the block devices
are simply a series of blocks that can be read from and written to. A file system does not care
where on the physical media a block resides. This is the job of the device's driver. When any
file system needs to read or write information or data on the block device, the supporting
device driver reads or writes the appropriate integral number of blocks containing the data.
Directories
EXT2 directories are simply special files (also represented by inodes) which contain pointers
to the inodes of their directory entries. Directories are structured in a hierarchical tree. Each
directory can contain files and subdirectories. Actually, a directory is simply a file containing
a list of entries. Each entry contains an inode number and a file name. When a process uses a
pathname, the kernel code searches in the directories to find the corresponding inode number.
After the name has been converted to an inode number, the inode is loaded into memory and
is used by subsequent requests.
Figure 3 Directory Entry Mapping to Inode Tables