Next | Internals of ext2fs | 21 |
For example, to open /home/mjd/.profile:
/ is always in inode 2 of the root filesystem
(Unless the process has done chroot)
Open inode 2, read in the data, look for home, get the i-number
Open the inode for home, read in the data, look for mjd, get the i-number
Open the inode for mjd, read in the data, look for .profile, get the i-number
Open the inode for .profile, read in the data, build a struct inode
The system file pointer table gets a pointer to this struct inode
The process's file descriptor table has a pointer to the file pointer
Incidentally, lseek adjusts the number in the open file table
Next | Copyright © 2001 M. J. Dominus |