Mail Archives: opendos/1997/02/04/13:20:32
[...]
>For example, Windows 95 will sometimes spontaneously rename files (at least
>from the viewpoint of an 8.3 app). So there are times when you've been
>working for weeks with "this_i~1" and suddenly Windows will decide the
>file is now called "this_i~2".
>
>Most of the other major difficulties with long file names are only applicable
>to Windows programs, though (like sometimes it'll quote long file names as
>arguments and sometimes it won't; how do you parse the command line correctly?)[...]
>PS: Has anyone looked to see how Samba deals with long filenames? I know they
>have some sort of hashing algorithm, but I don't know what it is.
Someone mailed me info about Samba's hashing system. Yes, it looks good. 8.3
filenames are generated from the long filename, so that given the long
filename you can *always* find the 8.3 filename without any additional info.
Much nicer than the Win95 system. I don't know Samba manages to get unique
names, but I'm not an expert on hashing algorithms.
Given an upper limit on a LFN of 31 chars --- that's what Macs use --- then an
8.3-LFN tuple could be stored in 42 chars. So, a 200-entry directory would use
a lookup file of 8400 bytes. This isn't too bad, but a linear search would
take a certain amount of time. You could improve things by using a hash table
or BSP but that would require inserting an entry, which would be rather
painful. Variable-length entries for the LFN's would improve efficiency and
remove the 31-char limit, but would make bookkeeping the lookup file even
nastier.
[Note: please do not cc: me copies of replies if they're also going to the
list! I get enough mail at the best of times without getting twice]
--
------------------- http://www-hons-cs.cs.st-and.ac.uk/~dg --------------------
If you're up against someone more intelligent than you are, do something
totally insane and let him think himself to death. --- Pyanfar Chanur
---------------- Sun-Earther David Daton Given of Lochcarron ------------------
- Raw text -