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 number of bits |
|
|
|
Modified (dirty) flag |
|
|
|
Maximum size of the files |
|
|
|
Filesystem type |
|
|
|
Superblock methods |
|
|
|
Disk quota methods |
|
|
|
Mount flags |
|
|
|
Filesystem magic number |
|
|
|
Dentry object of mount directory |
|
|
|
Semaphore used for unmounting |
|
|
|
Superblock semaphore |
|
|
|
Reference counter |
|
|
|
Secondary reference counter |
|
|
|
List of modified inodes |
|
|
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