Many of the VFS methods described in Chapter 12 have a corresponding Ext2 implementation. Because it would take a whole book to describe all of them, we limit ourselves to briefly reviewing the methods implemented in Ext2. Once the disk and the memory data structures are clearly understood, the reader should be able to follow the code of the Ext2 functions that implement them.
Many VFS superblock operations have a specific implementation in Ext2, namely
clear_inode. The addresses of the superblock
methods are stored in the
array of pointers.
Some of the VFS inode operations have a specific implementation in Ext2, which depends on the type of the file to which the inode refers.
The inode operations for Ext2 regular files and Ext2 directories
are shown in Table
18-8; the purpose of each method is described in the section
"Inode Objects" in
Chapter 12. The table does
not show the methods that are undefined (a
NULL pointer) for both regular files and
directories; recall that if a method is undefined, the VFS either
invokes a generic function or does nothing at all. The addresses of
the Ext2 methods for regular files and directories are stored in the
Table 18-8. Ext2 inode operations for regular files and directories
VFS inode ...