Re: [PATCH] 2.5.75 Support dentry revalidation under open(".")

Trond Myklebust (trond.myklebust@fys.uio.no)
Fri, 11 Jul 2003 19:17:15 +0200


>>>>> " " == Linus Torvalds <torvalds@osdl.org> writes:

> I'm not sure. It may not impact other filesystems, but it
> impacts the internal consistency of the dentry tree, and can
> cause some really nasty aliasing issues.

We can remove the d_invalidate(). See my response to your second
paragraph...

However as a more general argument: it is hard to avoid aliasing if
people are playing games on the server. If e.g. somebody does

mv foo bar
mkdir foo

on the server side while one of our processes was in the original
"foo" directory, it would IMHO be wrong not to allow us to d_drop()
the original dentry in order to allow other processes to access the
new "foo".

> If d_invalidate() returns a failure, that means that the dentry
> is still hashed (because it was busy), and returning NULL and
> leaving the dentry there sounds very wrong, since it can never
> be fixed with a new lookup.

The d_invalidate() is not really crucial for the purposes of the
open(".")-type call, and could indeed be taken out. The main point as
far as NFS is concerned is the d_revalidate() call.

I will resubmit the patch with the d_invalidate taken out...

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/