lkml.org 
[lkml]   [1997]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dcache questions
Martin von Loewis writes:
> The other approach is to use the d_revalidate operation. You define
> this for all negative VFAT dentries (I hope one can define dentry
> operations for negative dentries). Then, when asked to revalidate
> the dentry, you check whether this is a short alias. In this case,
> revalidation fails, and the system will try the real_lookup.

This would work, and I actually implemented it at first. However, it
still runs into problems. I set d_revalidate for all aliases so they
get looked up using real_lookup everytime. However, the dentry using
the alias still exists, so if I do

1# touch LongFileName
2# rm longfi~1
3# ls -l LongFileName

3 succeeds when it should fail. This is because the LongFileName
entry does not need to be revalidated. Of course, I could set everything
to revalidate, and then I'd be back to having no dcache at all (worse
than 2.0.x). Setting everything to revalidate would give the correct
results.

> Maybe you can extend the d_compare operation instead. When searching a
> name, the dcache will first compare the name to each existing dentry.
> So when searching a short name, it would search for the long name.
> vfat_cmp would not only check for dots in the back, but also check
> whether the short name is an alias for the long name, in which case
> vfat_cmp would succeed.
>
> The dcache will then conclude that it found the right dentry, and not
> try to create another one. In order to make this work, you will also
> have to instantiate the long name when asked for the short one.

This seems like the best suggestion, and I've done some work to try to
implement it. I need to extend both d_hash and d_compare because d_compare
will not get called unless the hash value is the same. I'll see if any
additional problems arise.

- Gordon

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