Re: How about we just let all inode numbers on FAT be zero?

Linus Torvalds (torvalds@transmeta.com)
Sun, 17 Jan 1999 09:52:11 -0800 (PST)


On Sat, 16 Jan 1999, Alexander Viro wrote:
>
> OK, then. We *have* to keep i_ino unique - icache will get royally
> confused otherwise, but we can easily guarantee uniqueness. Not a BFD. But
> it will mean that stat() on the same name will give different i_ino each
> time it is called. It may screw nfsd.

No, "i_ino" does _not_ have to be unique.

Yes, the icache will get confused _if_ the filesystem uses the inode
hashes. But a filesystem doesn't actually have to use the hashes at all:
you can get inodes with "get_empty_filp()", and just fill them in into the
dentry: they don't have to be cached.

Background: the inode hashes are really only for filesystems that
internally use "iget()" - which is just another helper routine that is
really only meant for traditional UNIX filesystems. If you don't use
iget(), but instead fill in the inode internally in the "lookup()"
routine, you can have all inodes with the same inode number if you wish
(but then you have the getcwd() problem, which is why I suggested just a
running counter).

> Linus, I'm afraid that we'll break nfsd that way. OTOH if somebody
> exports FAT filesystem via NFS...

knfsd would actually get this right, because it uses dentries.

Linus

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