Re: dentry bloat.

From: Manfred Spraul
Date: Sun May 09 2004 - 02:30:42 EST

Dipankar Sarma wrote:

On Sat, May 08, 2004 at 12:27:50PM -0700, Linus Torvalds wrote:

And yes, removing d_movecount would be ok by then, as long as we re-test
the parent inside d_lock (we don't need to re-test "hash", since if we
tested the full name inside the lock, the hash had better match too ;)

What's the prupose of d_move_count?
AFAICS it protects against a double rename: first to different bucket, then back to original bucket. This changes the position of the dentry in the hash chain and a concurrent lookup would skip entries.
d_lock wouldn't prevent that.

But I think d_bucket could be removed: for __d_lookup the test appears to be redundant with the d_move_count test. The remaining users are not performance critical, they could recalculate the bucket from d_parent and d_name.hash.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at