Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 :)

share|improve this question

migrated from stackoverflow.com Oct 25 '11 at 19:15

This question came from our site for professional and enthusiast programmers.

    
Actually, can someone move this over to Super User or Server Fault...? – Kaitlyn Mcmordie Oct 25 '11 at 1:55
1  
Kaitlyn: ask and ye shall receive :-) – paxdiablo Oct 25 '11 at 2:01
up vote 4 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.