4

As I understand them, apparently an inode basically points to the beginning of a file stored on disk. But it also seems that directories have the same functionality as well (i.e., they store the addresses of other files). I was wondering then, why is it useful to have an inode array around, with a bunch of inodes that point to files when already the directories do that as well?

-> edit: I was also wondering where "file headers" and "bitmaps" came into the picture as well

Thanks :)

Kaitlyn Mcmordie
  • 769
  • 1
  • 7
  • 20

2 Answers2

4

An inode the a data structure that contains information about a file. You might be thinking of inode numbers which are indexes into a list of inodes.

0

Directories don't have same functionality. They're just the listing of (name, inode) pairs. Suppose it's a big file stored at multiple data blocks on disc then it is the inode struct which keeps list of all pointers to those data blocks. dentry is just the hook which takes you to significant inode struct. There are several inode specific operations used to perform the file content management. I suggest to read struct inode. i_ino is just a field in it.