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

Simon Josefsson jas at pdc.kth.se
Sat May 1 20:09:40 CEST 1999


Magnus Ahltorp <map at stacken.kth.se> writes:

> > I assume this is due to mapping AFS inodes (or whatever the AFS
> > equivalent is called) into UFS inodes failes to produce unique UFS
> > inodes.
> 
> This is a problem, and it's an even worse problem on Linux, since
> in-use inode numbers must be unique. I'm using a naïve approach: the
> struct xnode pointer is used as the inode number. This guarantees that
> the functions (machine, time, file)->inum and (machine, time,
> inum)->file indeed are functions. However, it is not guaranteed that
> file->inum is a function, which, as I understand, is a POSIX
> requirement.

I just discovered that using fully qualified file names tend to give
every file in a directory the same inode number:

p01$ ls -lai $PWD|tail -8
3463758816 -rw-r--r--   1 jas      usr          4425 May  1 17:57 rfc2231.elc
3463758816 -rw-r--r--   1 jas      usr          3771 Oct 20  1998 score-mode.el
3463758816 -rw-r--r--   1 jas      usr          3397 May  1 17:57 score-mode.elc
3463758816 -rw-r--r--   1 jas      usr         10084 Mar  4 02:38 smiley.el
3463758816 -rw-r--r--   1 jas      usr          4268 Jan 20 01:52 time-date.el
3463758816 -rw-r--r--   1 jas      usr          3652 May  1 17:57 time-date.elc
3463758816 -rw-r--r--   1 jas      usr          6600 Apr 18 14:44 uudecode.el
3463758816 -rw-r--r--   1 jas      usr          4803 May  1 17:57 uudecode.elc
p01$ ls -lai |tail -8
3237889344 -rw-r--r--   1 jas      usr          4425 May  1 17:57 rfc2231.elc
3464520320 -rw-r--r--   1 jas      usr          3771 Oct 20  1998 score-mode.el
3237889824 -rw-r--r--   1 jas      usr          3397 May  1 17:57 score-mode.elc
3464520960 -rw-r--r--   1 jas      usr         10084 Mar  4 02:38 smiley.el
3464521280 -rw-r--r--   1 jas      usr          4268 Jan 20 01:52 time-date.el
3237889664 -rw-r--r--   1 jas      usr          3652 May  1 17:57 time-date.elc
3464522400 -rw-r--r--   1 jas      usr          6600 Apr 18 14:44 uudecode.el
3237888224 -rw-r--r--   1 jas      usr          4803 May  1 17:57 uudecode.elc

It's not consistent, sometimes it behaves like this and sometimes
not. Roughly 50/50 so it's fairly common. It doesn't make any
difference whether the files stat()ed is in the cache or not.

Does it make sense at all?  Could it be something else causing it?

> You are welcome to suggest better ways of doing this.

Is it possible to use the same algorithm as the other major afs client
vendor does? It seem to produce unique inodes even across platforms.





More information about the Arla-drinkers mailing list