On Tue, Jul 31, 2012 at 06:33:23PM -0400, J. Bruce Fields wrote: > From: "J. Bruce Fields" <bfields@xxxxxxxxxx> > > XXX: I don't understand this code, but I also can't see how it can be > right as is: a dentry marked DCACHE_DISCONNECTED can in fact be a > fully-connected member of the dcache. Is IS_ROOT() the right check > instead? > > Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> NAK. DISCONNECTED is cleared when the dentry is materialized. Here's the context. When an ocfs2 dentry is discoverable via the tree (lookup or splicing an alias), we hold a cluster lock (the "dentry lock"). This is why we override d_move(), to make sure that state is kept sane. That way, other nodes can communicate unlink to this node. They notify our node via the locking system, which does a d_delete()+dput(), which sets DISCONNECTED. When the dentry gets its final put, we can properly accept an empty lock. Joel -- "The one important thing i have learned over the years is the difference between taking one's work seriously and taking one's self seriously. The first is imperative and the second is disastrous." -Margot Fonteyn http://www.jlbec.org/ jlbec@xxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html