linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. R. Okajima" <hooanon05@yahoo.co.jp>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: vfs-scale, d_revalidate from nfsd
Date: Fri, 14 Jan 2011 14:12:35 +1100	[thread overview]
Message-ID: <AANLkTi=H7Zhe4VMsh_tdrd7Atb9FX8j4AdiMNepXGsj9@mail.gmail.com> (raw)
In-Reply-To: <20110114030325.GU19804@ZenIV.linux.org.uk>

On Fri, Jan 14, 2011 at 2:03 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Fri, Jan 14, 2011 at 01:57:55PM +1100, Nick Piggin wrote:
>> On Fri, Jan 14, 2011 at 1:03 AM, J. R. Okajima <hooanon05@yahoo.co.jp> wrote:
>> >
>> > NFSD calls filesystem's ->d_revalidate() with the parameter nd == NULL.
>> > So every
>> > ? ? ? ?if (nd->flags & LOOKUP_RCU)
>> > ? ? ? ? ? ? ? ?return -ECHILD;
>> > code which was added to ->d_revalidate() of FS which supports NFS
>> > exporting will crash.
>> >
>> > If we rewrite it as
>> > ? ? ? ?if (nd && (nd->flags & LOOKUP_RCU))
>> > ? ? ? ? ? ? ? ?return -ECHILD;
>> > the problem may not occur.
>> > But I am not sure whether lookup_one_len() call in NFSD support rcu-walk.
>>
>> 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.
>
> Oh, for fuck sake...  Would you at least mind posting your API change
> description to fsdevel before going for it?

Of course. I was discussing it with Miklos yesterday too, but haven't
finished getting a proposal together.

The main idea here would be to just pass in a flags parameter rather
thank poking in nd to get the rcu-walk status. That would solve this
problem and also avoid nd for most filesystems that don't care about
it.


> ->d_revalidate() is one sick puppy and it's intimately involved in atomic
> open rewrite.  Please, *please* don't make that shit even messier...

Right, I did agree with Miklos that using nd for passing rcu-walk
status was going in the wrong direction with that API. Do you
agree?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-01-14  3:12 UTC|newest]

Thread overview: 11+ 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 [this message]
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: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

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='AANLkTi=H7Zhe4VMsh_tdrd7Atb9FX8j4AdiMNepXGsj9@mail.gmail.com' \
    --to=npiggin@gmail.com \
    --cc=hooanon05@yahoo.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).