From: "J. Bruce Fields" <bfields@fieldses.org>
To: Mark Fasheh <mfasheh@suse.com>,
ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED
Date: Thu, 2 Aug 2012 08:59:10 -0400 [thread overview]
Message-ID: <20120802125910.GC9849@fieldses.org> (raw)
In-Reply-To: <20120802075743.GA3368@dhcp-172-17-9-228.mtv.corp.google.com>
On Thu, Aug 02, 2012 at 12:57:44AM -0700, Joel Becker wrote:
> On Tue, Jul 31, 2012 at 06:33:23PM -0400, J. Bruce Fields wrote:
> > From: "J. Bruce Fields" <bfields@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@redhat.com>
>
> NAK. DISCONNECTED is cleared when the dentry is materialized.
Are you sure? ocfs2 uses d_splice_alias in its lookup method, which
doesn't clear DISCONNECTED.
(d_materialise_unique does something similar to d_splice_alias and also
clears DISCONNECTED. However, I'm almost certain that's a bug in
d_materialise_unique. The export code connects a
looked-up-by-filehandle directory by doing lookups in parents one step
at a time up to the root, only clearing DISCONNECTED once we know that
the dentry is connected all the way up to the root. Clearing
DISCONNECTED as soon as a single dentry is connected to parents will
lead to bugs.)
> 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.
Alas, I'm not following you. I'll stare at some of the code and try to
understand....
> 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.
So you also depend on d_kill setting DISCONNECTED, huh.
--b.
next prev parent reply other threads:[~2012-08-02 12:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 22:33 [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED J. Bruce Fields
2012-08-02 7:57 ` Joel Becker
2012-08-02 12:59 ` J. Bruce Fields [this message]
2012-08-15 10:22 ` [Ocfs2-devel] " Joel Becker
2012-08-16 19:42 ` J. Bruce Fields
2012-08-16 19:54 ` [PATCH] ocfs2: comment missing-cluster-lock warning J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120802125910.GC9849@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).