From: "J. R. Okajima" <hooanon05@yahoo.co.jp>
To: Nick Piggin <npiggin@gmail.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: vfs-scale, d_revalidate from nfsd
Date: Tue, 15 Feb 2011 14:07:00 +0900 [thread overview]
Message-ID: <11234.1297746420@jrobl> (raw)
In-Reply-To: <AANLkTik1bj=Z9xFv8JfYrxqefFL1owmH=Rctj=XnH4Mp@mail.gmail.com>
Nick Piggin:
> On Fri, Jan 14, 2011 at 1:03 AM, J. R. Okajima <hooanon05@yahoo.co.jp> wrot=
> e:
> > NFSD calls filesystem's ->d_revalidate() with the parameter nd =3D=3D NUL=
> L.
:::
> Ah, good catch.
>
> I'm going to change the d_revalidate API so it takes and inode and rcu-walk
> flag parameter to make it easier for filesystems to implement rcu-walk.
>
> That will take care of this NULL nd case.
While you might already know there are similar parts in fs/namei.c, I'd
like to write here just to make sure.
- nfsd calls lookup_one_len()
- lookup_one_len()
+ __lookup_hash() with nd=NULL
+ do_revalidate(dentry, nd)
or/and
+ d_alloc_and_lookup(base, name, nd)
- do_revalidate(dentry, nd)
+ status = d_revalidate(dentry, nd)
+ d_op->d_revalidate(dentry, nd) <-- previous mail pointed out
+ if (status < 0) {
if (!(nd->flags & LOOKUP_RCU)) <-- this also needs fixing
dput(dentry);
} else {
if (nameidata_dentry_drop_rcu_maybe(nd, dentry)) <-- and here
return ERR_PTR(-ECHILD);
}
And if ->d_revalidate() can return ECHILD when 'nd' is NULL,
then nameidata_dentry_drop_rcu() call in d_revalidate() needs fixing
too.
I don't think ->lookup(inode, dentry, nd) call in d_alloc_and_lookup()
is a problem since every FS which supports NFS-exporting never refer
'nd' already.
J. R. Okajima
prev parent reply other threads:[~2011-02-15 5:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 14:03 vfs-scale, d_revalidate from nfsd J. R. Okajima
2011-01-14 2:57 ` Nick Piggin
2011-01-14 3:03 ` Al Viro
2011-01-14 3:12 ` Nick Piggin
2011-01-14 3:12 ` Nick Piggin
2011-01-14 3:20 ` Al Viro
2011-01-14 3:22 ` Al Viro
2011-01-14 3:29 ` Nick Piggin
2011-01-14 3:29 ` Nick Piggin
2011-01-14 3:38 ` Al Viro
2011-01-15 3:47 ` J. R. Okajima
2011-01-15 18:11 ` Nick Piggin
2011-02-15 5:07 ` J. R. Okajima [this message]
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=11234.1297746420@jrobl \
--to=hooanon05@yahoo.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.