The Venus kernel interface: Inode numbers

Next Previous Contents

## 7. Inode numbers

The Unix stat system call returns inode numbers for files. These should be correct for Coda files for library calls like getwd and tar to function correctly.

The mount points of volumes complicate the values which Venus assigns to the inode numbers in the statbuf structure. The rules are as follows:

1. A fid is converted to an integer (vol<<20) + (vnode<<10) + (uniq).
2. If a fid is the root of a volume, then it is assigned the inode number of the symlink which is its mountpoint.

The kernel should never cache the symlink mountpoints but may see them in case they cannot be covered. Also downcalls are made to purge the symlink fid from the cache, despite the fact that the kernel has never seen the mountpoint fid before.

Kernel code for Coda will need to implement a lookup mechanism to find vnodes (BSD) inodes (Linux) or FileHandles (Win) based on Fid, and it will need to be careful to get things right for volume roots.

Next Previous Contents