Re: [PATCH] vfs: add d_prune dentry operation
From: Sage Weil
Date: Thu Oct 06 2011 - 18:20:40 EST
On Thu, 6 Oct 2011, Christoph Hellwig wrote:
> On Wed, Oct 05, 2011 at 09:26:10PM -0700, Sage Weil wrote:
> > This adds a d_prune dentry operation that is called by the VFS prior to
> > pruning (i.e. unhashing and killing) a hashed dentry from the dcache. This
> > will be used by Ceph to maintain a flag indicating whether the complete
> > contents of a directory are contained in the dcache, allowing it to satisfy
> > lookups and readdir without addition server communication.
> What tree is the patch against? I seems to fail to apply against Linus'
Whoops, I rebased against v3.0 instead of latest master.
> It also seem like it basically should not be be opencoded but in a
> wrapper around dentry_lru_del for all cases but the lazy removal from
> LRU in case that is referenced, with some comments explaining the whole
Yeah, that's a bit better. There are four dentry_lru_del() callers, two
where we there is a reference, and two where we want to ->d_prune too.
How does the below look?