[Ocfs2-devel] [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED

Joel Becker jlbec at evilplan.org
Thu Aug 2 00:57:44 PDT 2012


On Tue, Jul 31, 2012 at 06:33:23PM -0400, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields at redhat.com>
> 
> 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 at redhat.com>

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 at evilplan.org



More information about the Ocfs2-devel mailing list