Why do inode number start from 1 and not 0 ?

Answers were Sorted based on User's Feedback



Why do inode number start from 1 and not 0 ?..

Answer / satish

1) All block and inode addresses start at 1. The first
block on the disk is block 1. 0 is used to indicate no
block.
2)0 is used as a sentinel 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.

Is This Answer Correct ?    17 Yes 2 No

Why do inode number start from 1 and not 0 ?..

Answer / virupakshicm

0 indicates no inode. We know that directory contains data
in the form of entries and each entry contains inode number
and filename. Suppose if we delete a particular file from
the directory, then that entries inode number will be
changed to 0, indicating that this particular entry is
free. So when the next file is created under the directory,
then the kernel uses this entry for the new file and it
also changes the filename component to new name. This is
reason why inode 0 is not used.

Is This Answer Correct ?    14 Yes 1 No

Why do inode number start from 1 and not 0 ?..

Answer / khaja

BECAUZ INODE HAS DISK BLOCKS WHICH START FROM 0 ie: inode
is 1.

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More Unix AllOther Interview Questions

What is a pipe?

18 Answers   Fichtner,


win 3.1 is a

0 Answers   TISL,


How to remove weird filenames?

1 Answers  


I am trying to unmount a remote file system,but I do not unmount that file system.How can i know the user name (i.e.,user who is using that file system).....write the command with argument

2 Answers  


what is the name os the first os and tell me the year when it was discovered

1 Answers   Qiscet,






What is mean by Mac os? Why it is named as like that? Which purprose it is using? Please answer me. Advance thanks.

2 Answers   Excel, GeniusPort,


what is mean by kernal?

9 Answers   Excel,


What do you mean by u-area (user area) or u-block?

6 Answers  


What are the read or write or execute bits on a directory mean?

2 Answers  


What is Expansion swap?

1 Answers   KISSI,


How to setup display for a remote system?

3 Answers  


If the terminal is not showing the login prompt,what's the 1st thing you should check?and how do you solve the problem?

2 Answers   TCS,


Categories