Subject: Re: Mac Aliases changing
From: Mario Klebsch DG1AM (mkl@charlie.rob.cs.tu-bs.de)
Date: Thu Jun 26 1997 - 07:31:53 EDT
Hi!
>A caveat of the inode number approach would be the handling of =
>deleted files and reused inodes. Suppose file f starts at inode i(f) =
>and alias a points to f. Then, we delete f and create a new file g. =
>If this file's first inode i(g) =3D=3D the former i(f), the alias a =
>automatically would point to it. Isn't that so? Please correct me.
Yes, thats the way it is (or would be). But a sollution could be to
use the ctime (cretion time) of the i-node to contruct "unreusable"
FileIDs. But it would be another 32 Bit of information, which probably
cannot be stored in FileIDs.
I just had a look at our local filesystem. The largest Filesystem
(2GByte) does have less than 2^20 inodes. This would leave 12 Bits to
make the FileIDs unique. My first idea is to use a hash function to
reduce the 32 bit ctime to 12 bit. Of course, this does not scale
well, so at least the number of ctime bits should automagicly adapt to
the exported filesystem.
But the inode aproach does have problems. Althoug UNIX internally does
all file accesses using inodes, the system call interface does not
provide any means to use inodes to access files. So accessing a file
by inode is expensive (if done in user space). NFS server typically
run inside the kernel, and so they can access the files using the
inode number. So this aproach probably would have to be implemented in
kernel, to be efficient.
Another problem is the fact, that the inode numbers are only uniqe on
the UNIX volumes. But netatalk does not export a UNIX volume, but a
UNIX directory tree, which can contain multiple volumes all having
their own uniqe inode numbers.
It all leads to the conclusion, that the 32 Bit FileID is a major
problem of scalability. NFS file handels are much longer than 32
bit. They are large enough to hold the information needed to locate
the files on the server.
73, Mario
-- Mario Klebsch, DG1AM, M.Klebsch@tu-bs.de +49 531 / 391 - 7457 Institut fuer Robotik und Prozessinformatik der TU Braunschweig Hamburger Strasse 267, 38114 Braunschweig, Germany
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:25:12 EST