inode clashes (linux 2.2.x, arla 0.2x)

Magnus Ahltorp map at stacken.kth.se
Mon May 3 22:09:40 CEST 1999


> > The problem with that algorithm is that (machine, inum)->file is not
> > guaranteed to be a function, which is a requirement for Linux.
> 
> Clearly this is not true - the above statement requires that no two
> files have the same inode number, even on different machines, or on
> different filesystems on the same machine.  At the same time, it does
> not require that two inode numbers not refer to the same file.  The
> requirement you are trying to state is that for any given mounted
> filesystem at any given time, inum->file must be a bijection (that is,
> it is a function and its inverse is a function).

Yes, I forgot the filesystem part. But otherwise, it means that for
every machine, no two files have the same inode number. It should be
(machine, filesystem, inum, time)->file.

> However, it is not clear to me that anything in the Linux kernel actually
> requires this.  The contrib port of 3.3a does not make this guarantee;
> it uses the same inode function that AFS clients have used since the
> beginning of time.  Aside from confusion on the part of some programs
> that expect this to be the case, I have never seen a problem due to this
> behaviour.

The Linux requirement is that at any time, the pair fs:inum should
point out exactly one inode. This is required in fs/inode.c:iget(). It
uses the inode number to lookup the struct inode.

/Magnus
map at stacken.kth.se





More information about the Arla-drinkers mailing list