From: Wengang Wang <wen.gang.wang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] Track negative dentries
Date: Tue, 22 Jun 2010 13:22:48 +0800 [thread overview]
Message-ID: <20100622052248.GA2362@laptop.us.oracle.com> (raw)
In-Reply-To: <20100622033624.GB15659@mail.oracle.com>
On 10-06-21 20:36, Joel Becker wrote:
> On Tue, Jun 22, 2010 at 11:23:33AM +0800, Wengang Wang wrote:
> > Actually I meant two dentries in the two run of 'ls -l'.
> > At the first run, a dentry, dentry A, is created. Because fileA doesn't exist,
> > dentry->d_inode is NULL. Then a do_revalidate() is run,
> > ocfs2_dentry_revalidate() returns "not valid" since d_inode is NULL.
> > Thus the dentry A is unhashed from cache by d_invalidate().
> > At the second run of 'ls -l', since dentry A is unhashed, there is no dentry for
> > fileA exist in dentry hash, a new dentry, dentry B, is created. The new dentry B
> > don't have any info about parent ino.
> >
> > I found that when testing my patch for the "track negative dentries".
> > Maybe I misunderstand something?
>
> When that dentry gets linked into the tree, it will point to its
> d_parent. So the parent inode is dentryB->d_parent->d_inode.
Yes Joel, I know that link.
I meant there is no parent inode number stored on on dentryB it's self,
thus no way to compare it with dentryB->d_parent->d_inode.
We set the parent inode number info to dentryA(somewhere in d_fsdata).
But it's lost at the second 'ls -l' because dentryB is got instead of dentryA.
regards,
wengang.
next prev parent reply other threads:[~2010-06-22 5:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 15:02 [Ocfs2-devel] [PATCH] Track negative dentries Goldwyn Rodrigues
2010-06-18 16:06 ` Sunil Mushran
2010-06-23 18:25 ` Goldwyn Rodrigues
2010-06-23 19:05 ` Sunil Mushran
2010-06-23 20:27 ` Goldwyn Rodrigues
2010-06-23 21:01 ` Joel Becker
2010-06-23 21:32 ` Goldwyn Rodrigues
2010-06-21 4:27 ` Wengang Wang
2010-06-21 17:08 ` Sunil Mushran
2010-06-22 3:23 ` Wengang Wang
2010-06-22 3:36 ` Joel Becker
2010-06-22 5:22 ` Wengang Wang [this message]
2010-06-22 5:38 ` Sunil Mushran
2010-06-22 6:14 ` Wengang Wang
2010-06-22 16:53 ` Mark Fasheh
2010-06-23 4:57 ` Wengang Wang
2010-06-23 18:30 ` Goldwyn Rodrigues
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=20100622052248.GA2362@laptop.us.oracle.com \
--to=wen.gang.wang@oracle.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).