lkml.org 
[lkml]   [1997]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dcache questions
> > - make the filesystem-specific hashing and name comparing functions
> > compare the two names as equal - so that only one dentry exists for
> > both of them. This is the "real" fix, but depending on how the name
> > mangling works it may not be all that easy.
>
> 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).

I think it can be done reliably. Of course, you not only have to look
at the names themselves, but you also have to keep the association between
the names around, which you've learned when you first read the directory.

In the Linux dcache case, you'd have to cache the long name, and the
associated inode. In the inode, remember the short name which you
found when reading the directory. Wouldn't that work?

Regards,
Martin

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.064 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site