linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	bfields@fieldses.org
Subject: Re: [PATCH v2] rpc_pipe: set dentry operations at d_alloc time
Date: Mon, 15 Jul 2013 06:43:15 -0400	[thread overview]
Message-ID: <20130715064315.1adc9543@corrin.poochiereds.net> (raw)
In-Reply-To: <20130714140011.GI4165@ZenIV.linux.org.uk>

On Sun, 14 Jul 2013 15:00:11 +0100
Al Viro <viro@ZenIV.linux.org.uk> wrote:

> On Tue, Jul 02, 2013 at 01:00:52PM -0400, Jeff Layton wrote:
> > Currently the way these get set is a little convoluted. If the dentry is
> > allocated via lookup from userland, then it gets set by simple_lookup.
> > If it gets allocated when the kernel is populating the directory, then
> > it gets set via __rpc_lookup_create_exclusive, which has to check
> > whether they might already be set. Between both of these, this ensures
> > that all dentries have their d_op pointer set.
> > 
> > Instead of doing that, just have them set at d_alloc time by pointing
> > sb->s_d_op at them. With that change, we no longer want the lookup op
> > to set them, so we must move to using our own lookup routine.
> 
> There's a better solution - just make simple_lookup() skip d_set_d_op()
> if superblock already has ->s_d_op (and thus d_alloc() has already
> set the damn thing).  Voila - we can just set ->s_d_op and leave
> inode_operations as is.

Yeah, that is a better solution and the code now in mainline looks
reasonable. Trond already merged this patch however, so I'll spin up
another patch on top of mainline to convert this back to
simple_dir_inode_operations.

Thanks,
-- 
Jeff Layton <jlayton@redhat.com>

      reply	other threads:[~2013-07-15 10:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  1:05 [PATCH 0/2] rpc_pipe: clean up how dentry operations get set in rpc_pipefs Jeff Layton
2013-06-25  1:05 ` [PATCH 1/2] rpc_pipe: export simple_dentry_operations and have rpc_pipefs use it Jeff Layton
2013-06-25 15:36   ` Myklebust, Trond
2013-07-01 16:22     ` Jeff Layton
2013-07-02 15:29       ` Jeff Layton
2013-06-25  1:05 ` [PATCH 2/2] rpc_pipe: set dentry operations at d_alloc time Jeff Layton
2013-06-25 11:00   ` Jeff Layton
2013-07-02 17:00 ` [PATCH v2] " Jeff Layton
2013-07-14 14:00   ` Al Viro
2013-07-15 10:43     ` Jeff Layton [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=20130715064315.1adc9543@corrin.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@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).