Re: structure dentry help...

Alexander Viro (viro@math.psu.edu)
Mon, 1 Nov 1999 09:33:25 -0500 (EST)


On 1 Nov 1999, Trond Myklebust wrote:

> >>>>> " " == Alexander Viro <viro@math.psu.edu> writes:
>
> > Notice that:
> > a) we can't handle more than one dentry for a directory. VFS
> > does not allow that, partially due to the d_alias abuse in NFS
> > and friends.
>
> This is less and less true. We still use the d_alias field in NFS (see
> nfs_free_dentries()), but it could probably be replaced by a
> shrink_dcache_parent(dentry->d_parent).
>
> BTW: Why does the d_alias stop us handling > 1 dentry for a directory?
> In particular for NFS this is a bug, since the statelessness
> requirement, means you cannot assume that renames etc. won't
> happen behind your back. I've been trying to get rid of all that
> code that tries to second-guess the filesystem state on the
> server.

Check what happens if you get different pathes to the same place.
Consider the following picture:

a->b ->c ->d
->b'->c'->d'

Now, remove d. shrink_dcache_parent will not help here. Moreover,
there are problems with inconsistent dcache state - stale dentries and all
such. It's simply not supposed to work that way.

The real fix will include the dcache changes, but that affect many
filesystems and some are pretty sensible. Yup, NFS is one of them.

-
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/