From: Jeff Layton <jlayton@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: trond.myklebust@netapp.com, chuck.lever@oracle.com,
steved@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v3 2/3] sunrpc: replace sunrpc_net->gssd_running flag with a more reliable check
Date: Wed, 13 Nov 2013 20:56:28 -0500 [thread overview]
Message-ID: <20131113205628.209af84a@corrin.poochiereds.net> (raw)
In-Reply-To: <20131114102448.49ccbf50@notabene.brown>
[-- Attachment #1: Type: text/plain, Size: 2728 bytes --]
On Thu, 14 Nov 2013 10:24:48 +1100
NeilBrown <neilb@suse.de> wrote:
> On Wed, 13 Nov 2013 15:28:12 -0500 Jeff Layton <jlayton@redhat.com> wrote:
>
> > Now that we have a more reliable method to tell if gssd is running, we
> > can replace the sn->gssd_running flag with a function that will query to
> > see if it's up and running.
> >
> > There's also no need to attempt an upcall that we know will fail, so
> > just return -EACCES if gssd isn't running in that case.
> >
> > Signed-off-by: Jeff Layton <jlayton@redhat.com>
> > ---
> > include/linux/sunrpc/rpc_pipe_fs.h | 14 ++++++++++++++
> > net/sunrpc/auth_gss/auth_gss.c | 10 +++++-----
> > net/sunrpc/netns.h | 2 --
> > net/sunrpc/rpc_pipe.c | 16 ++++++++++++----
> > 4 files changed, 31 insertions(+), 11 deletions(-)
> >
> > diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
> > index 85f1342..438e606 100644
> > --- a/include/linux/sunrpc/rpc_pipe_fs.h
> > +++ b/include/linux/sunrpc/rpc_pipe_fs.h
> > @@ -131,5 +131,19 @@ extern int rpc_unlink(struct dentry *);
> > extern int register_rpc_pipefs(void);
> > extern void unregister_rpc_pipefs(void);
> >
> > +#if IS_ENABLED(CONFIG_SUNRPC_GSS)
> > +
> > +extern bool gssd_running(struct net *net);
> > +
> > +#else /* !CONFIG_SUNRPC_GSS */
> > +
> > +static inline bool
> > +gssd_running(struct net *net)
> > +{
> > + return false;
> > +}
> > +
> > +#endif /* CONFIG_SUNRPC_GSS */
>
> Do we really need IS_ENABLED(CONFIG_SUNRPC_GSS) around this?
>
> The function is tiny, and could even be a "static inline" with very little
> cost.
>
> Let's just always define it.
>
> But independent of that, the patches look good to me and appear to work.
>
> By the way, the current "only impose the 15 second delay the first time"
> doesn't really work.
> If you:
> mount 10.0.2.2:/home /mnt ; umount /mnt
>
> repeatedly then it will take 15-18 seconds every time.
>
> This is with rpc.gssd not running, but rpc.idmapd running.
>
> As rpc.idmapd opens some rpc-pipe thing, that sets the gssd_running flag.
> So that is an extra reason to get rid of the flag.
>
> Thanks,
> NeilBrown
(adding linux-nfs ml to mailing list since I missed it earlier)
Ahh that is interesting...
My rationale here was that even if someone started gssd on a kernel
that didn't have CONFIG_SUNRPC_GSS enabled, that we wouldn't want
gssd_running to return true.
But...you're probably right and there's no need for it. I'll plan to
fix that (and the commit message error you spotted) and resend tomorrow
sometime.
Thanks for the review...
--
Jeff Layton <jlayton@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next parent reply other threads:[~2013-11-14 1:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1384374493-8006-1-git-send-email-jlayton@redhat.com>
[not found] ` <1384374493-8006-3-git-send-email-jlayton@redhat.com>
[not found] ` <20131114102448.49ccbf50@notabene.brown>
2013-11-14 1:56 ` Jeff Layton [this message]
2013-11-13 21:52 [PATCH v3 0/3] sunrpc/nfs: more reliable detection of running gssd Jeff Layton
2013-11-13 21:52 ` [PATCH v3 2/3] sunrpc: replace sunrpc_net->gssd_running flag with a more reliable check Jeff Layton
2013-11-14 0:36 ` Myklebust, Trond
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=20131113205628.209af84a@corrin.poochiereds.net \
--to=jlayton@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=steved@redhat.com \
--cc=trond.myklebust@netapp.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).