VFS Data Structures
Each VFS object is stored in a suitable data structure, which includes both the object attributes and a pointer to a table of object methods. The kernel may dynamically modify the methods of the object and, hence, it may install specialized behavior for the object. The following sections explain the VFS objects and their interrelationships in detail.
Superblock Objects
A superblock object consists of a super_block structure whose fields are
described in Table
12-2.
Table 12-2. The fields of the superblock object
Type | Field | Description |
|---|---|---|
| | Pointers for superblock list |
| | Device identifier |
| | Block size in bytes |
| | Block size in bytes as reported by the underlying block device driver |
| | Block size in number of bits |
| | Modified (dirty) flag |
| | Maximum size of the files |
| | Filesystem type |
| | Superblock methods |
| | Disk quota handling methods |
struct quotactl_ops * | s_qcop | Disk quota administration methods |
struct export_operations * | s_export_op | Export operations used by network filesystems |
| | Mount flags |
| | Filesystem magic number |
| | Dentry object of the filesystem’s root directory |
| | Semaphore used for unmounting |
| |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access