Why are the first two inodes reserved in the Unix file system?
-
The wikipedia page http://en.wikipedia.org/wiki/Unix_File_System says that Inodes are numbered sequentially, starting at 0. The first two inodesĀ are reserved for historical reasons, followed by the inode for the http://en.wikipedia.org/wiki/Root_directory, which is always inode 2. What are those historical reasons?
-
Answer:
On ext2 there are more than two inodes reserved for some special purpose as follows: Inode 0 is used as a senital value to indicate null or no inode. similar to how pointers can be NULL in C. without a sentinel, you'd need an extra bit to test if an inode in a struct was set or not. Inode 1 is the bad blocks inode - I believe that its data blocks contain a list of the bad blocks in the filesystem, which should not be allocated. Inode 2 is the root inode - The inode of the root directory. It is the starting point for reaching a known path in the filesystem. Inode 3 is the acl index inode. Access control lists are currently not supported by the ext2 filesystem, so I believe this inode is not used. Inode 4 is the acl data inode. Of course, the above applies here too. Inode 5 is the boot loader inode. Inode 6 is the undelete directory inode. It is also a foundation for future enhancements, and is currently not used. Inodes 7-10 are reserved and currently not used. You can read in details here http://uranus.chrysocome.net/explore2fs/es2fs.htm
Raghav Yadav at Quora Visit the source
Related Q & A:
- Unix tools: what if a file is named minus something?Best solution by Super User
- How to file state taxes while W-2 from two states (different employer?Best solution by Yahoo! Answers
- How to make the first page of a PDF display by itself and the succeeding pages display two-up?Best solution by Super User
- What is the best system? The multi party or the two party system?Best solution by Answerbag.com
- What does a Unix System Administrator do?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.