a faq on broken aliass (was Re: Fixed file ID's)


Subject: a faq on broken aliass (was Re: Fixed file ID's)
From: a sun (asun@cobalt.com)
Date: Tue Jan 18 2000 - 04:35:36 EST


   [another question on broken aliases and fixed file id's ...]

if somebody could enter this as a faq, that would be great. there
seems to be some confusion on why aliases don't work. here's the
answer:
        1) macos pre-8.6 used a path composed of fileid/directory id's
           to lookup aliases.
        2) in afpd, file id's are fixed, but directory id's are
           variable.

as a result, macos pre-8.6 will just fail with aliases that refer to
files that are more than one directory level deep. with macos 8.6 or
higher, the alias manager will attempt to resolve those by
pathname. as long as a directory doesn't get assigned the same
directory id as one in the alias, things should be all right. for
files, this algorithm should be good enough as file id's are not
likely to be duplicated on a system. for directory aliases, however,
this can fail because directory ids can get re-assigned between
connections.

anyways, i'm going to stick in a workaround that should handle things
until we get proper catalogue database support. currently, this is how
file id's are assigned:
        16 bits: device
        16 bits: inode

i'll change the id assignment to look like the following:
         1 bit: directory/file identifier (set == it's a file)
        13 bits: device
        18 bits: inode

18 bits allows for 262144 files on the same device while 13 bits for
devices should still be reasonably unique. oh yeah, i'll use lstat as
well so that symbolic links have their own numbers as well.

there. is everybody happy now? i'll release something right after i
finish up some codepage work.

-a



This archive was generated by hypermail 2b28 : Wed Jan 17 2001 - 14:29:51 EST