Subject: Re: [netatalk-admins] DIDs - an idea -or- I didn't read the AFP specs completely yet
From: Donald L. Nash (D.Nash@utexas.edu)
Date: Wed Apr 15 1998 - 18:08:40 EDT
--On Wed, Apr 15, 1998 4:45 PM -0500 "Gary E. Bickford" <garyb@slb.com>
wrote:
> gettimeofday((struct timeval *)&tv, (struct timezone *)NULL);
> sec = (int)tv.tv_sec;
> usec = (int)(tv.tv_usec % 1000000);
>
> /* The max value usec can have is 0xF423F, so we use only five hex
> * digits for usecs:
> */
> sprintf(uniqid, "%s%08x%05x", prefix, sec, usec);
> Push(uniqid, STRING);
This won't work and cannot easily be made to work because DIDs are only 32
bits long. I looked into using inode numbers combined with major and minor
device numbers to create an inode-based DID that worked for volumes which
span filesystems, but had to give up on it because inode numbers are 24 bits
long and major and minor device numbers are each 8 bits long. I couldn't
figure out a way to cram 40 bits into 32 without the possibility of
collision. :-)
The directory/.DID and volume/.DIDdb ideas sound the best so far.
-- Donald L. Nash, <D.Nash@utexas.edu>, PGP Key ID: 0x689DA021 The University of Texas System Office of Telecommunication Services PGP Key Fingerprint: D6D2 CBEE 8F56 60B2 736C 031A A1E0 AF3D
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:32:23 EST