Coda File System

Re: Dir entry XX, should be in hash bucket X

From: Jan Harkes <>
Date: Thu, 2 Sep 2004 09:44:09 -0400
On Wed, Sep 01, 2004 at 07:09:30PM -0500, Troy Benjegerdes wrote:
> >     $ ./hash "Various Artists-?????.m3u"
> >     87
> >     $ ./hash "Various Artists-A:F:S.m3u"
> >     41
> > 
> > So it does in fact look like it is in the right bucket for the funny name.
> > Maybe the name isn't corrupt, but for some reason the hash function doesn't
> > get it right on your machine (char is a 7-bit datatype?).
> PPC defaults to unsigned char, not signed char.. and .. surprise, I can
> see the file on x86. (the filename is legit.. I think they are chinese
> characters)
> Is this a client and server side hash? Can we just put a decent hash
> function in?

This is a hash that is used both on the client and the server. We can't
really change it without making all existing directories unreadable.
The only thing we can aim for in the short term is to make it give the
an identical result on all possible platforms (big endian/little endian,
32-bit/64-bit, signed chars/unsigned chars).

Received on 2004-09-02 09:46:36