duplicated inode numbers for different files?

From: "Andrey Borzenkov"
Date: Mon Feb 02 2004 - 04:42:40 EST



Are inode numbers supposed to be unique inside a filesystem? There
is some code in nfsd (at least in 2.4) that suggests that it is not
always the case.

Background:

Supermount is currently using 1-to-1 correspondence
between super- and subfs inodes. This is OK for all except root
inode - it still has to have some inode number for root all the time.
So it assigns arbitrary number and changes it after subfs has been
mounted to reflect subfs root.

This breaks for NFS (at least for Linux client, cannot test any other)
because NFS thinks root inode changed after having been mounted
and gives up.

idea is to use fixed root number; it can be done but may result
in duplicated number. Using ino == 0 may lessen chances (is it valid
BTW?)

Hmm ... actually if subfs is allowed to have duplicated inode numbers
then supermount needs different get inode implementation anyway.

TIA

-andrey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/