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 |
| |
Get Understanding the Linux Kernel, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.