On Thu, 14 Nov 2013 10:24:48 +1100 NeilBrown <neilb@xxxxxxx> wrote: > On Wed, 13 Nov 2013 15:28:12 -0500 Jeff Layton <jlayton@xxxxxxxxxx> 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@xxxxxxxxxx> > > --- > > 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@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature