Re: dcache questions

Bill Hawes (whawes@star.net)
Wed, 31 Dec 1997 16:39:39 -0500


Gordon Chaffee wrote:

> A ~ is not a guarantee in an alias, so this method cannot be used.

Well, there must be some method of determining if a name is a potential
short alias -- if there are other characters used besides a ~ you could
check for these as well. So you could use a regular expression pattern
to screen for short aliases, or at the very worst just see if the name
fits an 8.3 pattern.

> How about a small change to how the dcache works? Add a linked element
> to the dentry structure. Then for vfat longname/alias pairs, the
> two entries would be added to the dcache. The longname would be used
> as the normal dentry, and the shortname would set its linked element
> to point to the longname dentry. In lookup_dentry, the linked element
> would be followed to get the base dentry, so only the longname dentry
> would ever be passed into calls like vfat_lookup. This probably would
> complicate shrinking of the dcache, so it might not be an acceptable
> solution.

I think anything leading to creating multiple dentries to represent one
file is going to complicate matters unnecessarily. You could never be
sure that all of the dentries have been created, so checking the disk
will sometimes be necessary. With a reasonable hash code and disk cache
it shouldn't be too slow.

Regards,
Bill