...
/Solution Through Indirection: The Inode Map
Solution Through Indirection: The Inode Map
This lesson presents the solution to finding inodes, with the help of a level of indirection.
We'll cover the following...
Inode map (imap)
To remedy the problem of finding inodes, the designers of LFS introduced a level of indirection between inode numbers and the inodes through a data structure called the inode map (imap). The imap is a structure that takes an inode number as input and produces the disk address of the most recent version of the inode. Thus, you can imagine it would often be implemented as a simple array, with 4 bytes (a disk pointer) per entry. Any time an inode is written to disk, the imap is updated with its new location.
The imap, unfortunately, needs to be kept persistent (i.e., written to disk); doing so allows LFS to keep track of the ...