Re: dcache questions

James Mastros (root@jennifer-unix.dyn.ml.org)
Wed, 31 Dec 1997 22:09:21 -0500 (EST)


On Wed, 31 Dec 1997, David C Niemi wrote:
> On Wed, 31 Dec 1997, Martin von Loewis wrote:
> [I wrote]
> > > This really can't be reliably done via name-mangling, because the mangling
> > > is not only fairly complex but also nondeterministic (the ~1 can be a ~2
> > > depending on what else is in the directory, and when you get past ~9 you
> > > have to subtract another letter from the name fragment at the front).
[...]
> Let me put the idea of deriving shortnames from longnames to rest, in case
> anyone else still believes in it.
>
> Shortname prediction is not reliable because it is nondeterministic even if
> you know the short and long names of all files in the directory. Think of
> a case where there was already a file with a shortname of "foofoo~1" and a
> file called "foofoofoo" (shortname "foofoo~2") was created, then later the
> file with the shortname of "foofoo~1" is deleted. There is no way to know
> that "foofoofoo" should have the shortname of "foofoo~2" unless you
> remember the entire past history of the directory. So thinking you can
> predict the shortname based on the longname leads to a 95% reliable and 5%
> horribly wrong system.

And also, there is an (undocumented) way of making the shortname of
foobarbaz.bax foobarba.bax -- no ~ at all. (assuming, of course, that there
isn't a foobarba.bax -- then you get foobar~1.bax.)

-=- James Mastros

-- 
Information as a base of power is coming to an end.  In the way the world
works tomorrow, the power to *do* *something* *with* *information* is what
will matter. 

-=- James Mastros, rephrasing Nugget (David McNett, distributed.net Big Man)