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

Linus Torvalds (torvalds@transmeta.com)
Sat, 16 Jan 1999 17:10:26 -0800 (PST)


On Sat, 16 Jan 1999, Colin Plumb wrote:
>
> And you know, maybe that *is* the right answer. Just teach the backup
> software that inode number zero means there are no hard links and
> the kernel's tired of lying to it.

I'd prefer for inode numbers to be completely made up, possibly by just
doing

static u32 msdos_ino = 0;
#define get_vfat_ino() (++msdos_ino)

The inode number doesn't have to be unique, but the above makes at least a
small attempt to make sure that under normal circumstances you can never
see any inode numbers that are the same.

Note that things like "getcwd()" depend on inode numbers, until everybody
has upgraded to the (currently nonexistent) library that uses the getcwd()
system call. So returning 0 is not an option, but returning a pseudo-
random number that is only stable for as long as an inode is in use _is_
an option (ie the silly 32-bit counter).

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/