RE: tmpfs, NFS, file handles

Neil Brown
2002-02-21T22:59:43Z

On Thursday February 21, Charles.Lever@netapp.com wrote:
> > That means you are only hashing inodes exported by NFS, and you have
> > a pretty good guarantee of uniqueness (providing time doesn't go
> > backwards).
>
> this may be obvious... apologies.
>
> don't use the TOD directly -- it can go backwards if ntpd or an admin
> sets it back. better to use a monotonically increasing number that
> you completely control yourself.
>
> also, if your timer resolution isn't good enough, a window opens
> where two generated "uniquifiers" can be the same for all intents
> and purposes.

Certainly timeofday by itself isn't enough for the various reasons you
mention. But it does help to avoid accepting filehandles from before
the last reboot.
In my proposal there there were three numbers:
An address
A sequentially assigned inode number
A time of day.

Any two of these is probably adequate most of the time, but could
occasionally result in equal filehandles for different files. Adding
a third makes collision virtually impossible.

NeilBrown