Messages in this thread | | | Date | Wed, 6 Jan 1999 02:38:19 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: dcache problems with vfat |
| |
On Wed, 6 Jan 1999, Gordon Chaffee wrote: > > You run into inconsistency problems with vfat aliases. You could > be accessing a path two ways:
UMSDOS handles this by being careful about never allowing aliases, and thus avoiding the problem completely.
One way of avoiding aliases is roughly: - when you do a lookup, you check (after the lookup is basically complete) whether the same parent has another dentry pointing to the same file. - if there is another dentry, you: - unhash that other dentry if it has no other users, essentially replacing it with the new one you just looked up. - if the older dentry already had users, you instead drop the new one and return the old dentry instead (which is the same file, just aliased).
The above has two problems: - the current VFS dentry code won't allow you to return any dentry but the one it allocated for you. That shouldn't be horribly hard to change. - it's inefficient for the case where somebody actually uses both names interchangably - one of them simply will not be cached at all.
I don't think either problem should be all that big, but..
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |