Skip to contentSkip to conversation

Track negative dentries

Ocfs2-devel Wengang Wang 1 participant 1 message Mar 8, 2010 OCFS2

lore
Share & tools
lore
#0 lore raw

Hi Sunil/Joel,

For the small task "Track negative dentries", I have a question that where do we put the compare of inode lock generations?
During the path walking, I think in only ocfs2_dentry_revalidate() and ocfs2_lookup() we have the chance to do the compare. For d_revalidate(), we have to return "not valid" if the dentry is a negative one. So we can only do it in lookup(). But if d_revalidate() returns "not valid", the dentry will be unhashed from dentry cache before lookup(). And then for next path walking, the dentry won't be found in cache and the generation info is also lost(A new dentry object is created then..).

So how does it work?

regards,
wengang.