Suppose we call 'open' to open the file
"/home/gal/docs/hello.c"
How many inodes must be consulted?
- get the inode for "/"; then use it to read the entries of the
directory
The entry for home contains its inode number
- get the inode for home; use it to read the entries of
/home
The entry for gal contains its inode number
- get the inode for gal; use it to read the entries of
/home/gal
The entry for docs contains its inode number
- get the inode for docs; use it to read the entries of
/home/gal/docs
The entry for hello.c contains its inode number
- get the inode for hello.c; finally(!) use it to read the file hello.c
Ugh! Possibly lots of disk accesses!