Message ID | 20211217215046.40316-9-trondmy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Assorted patches for knfsd | expand |
> On Dec 17, 2021, at 4:50 PM, trondmy@kernel.org wrote: > > From: Jeff Layton <jeff.layton@primarydata.com> > > In some cases, we may want to use a userland NLM server which will > require that we turn off lockd. Does this adminstrative interface need to be container-aware? > Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> > Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> > Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> > --- > fs/nfsd/nfssvc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c > index ccb59e91011b..7486a6f5fc21 100644 > --- a/fs/nfsd/nfssvc.c > +++ b/fs/nfsd/nfssvc.c > @@ -340,8 +340,19 @@ static void nfsd_shutdown_generic(void) > nfsd_file_cache_shutdown(); > } > > +/* > + * Allow admin to disable lockd. This would typically be used to allow (e.g.) > + * a userspace NLM server of some sort to be used. > + */ > +static bool nfsd_disable_lockd = false; > +module_param(nfsd_disable_lockd, bool, 0644); > +MODULE_PARM_DESC(nfsd_disable_lockd, "Allow lockd to be manually disabled."); > + > static bool nfsd_needs_lockd(struct nfsd_net *nn) > { > + if (nfsd_disable_lockd) > + return false; > + > return nfsd_vers(nn, 2, NFSD_TEST) || nfsd_vers(nn, 3, NFSD_TEST); > } > > -- > 2.33.1 > -- Chuck Lever
This seems like a really specialized requirement. Is anyone outside hammerspace doing this? --b. On Fri, Dec 17, 2021 at 5:02 PM <trondmy@kernel.org> wrote: > > From: Jeff Layton <jeff.layton@primarydata.com> > > In some cases, we may want to use a userland NLM server which will > require that we turn off lockd. > > Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> > Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> > Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> > --- > fs/nfsd/nfssvc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c > index ccb59e91011b..7486a6f5fc21 100644 > --- a/fs/nfsd/nfssvc.c > +++ b/fs/nfsd/nfssvc.c > @@ -340,8 +340,19 @@ static void nfsd_shutdown_generic(void) > nfsd_file_cache_shutdown(); > } > > +/* > + * Allow admin to disable lockd. This would typically be used to allow (e.g.) > + * a userspace NLM server of some sort to be used. > + */ > +static bool nfsd_disable_lockd = false; > +module_param(nfsd_disable_lockd, bool, 0644); > +MODULE_PARM_DESC(nfsd_disable_lockd, "Allow lockd to be manually disabled."); > + > static bool nfsd_needs_lockd(struct nfsd_net *nn) > { > + if (nfsd_disable_lockd) > + return false; > + > return nfsd_vers(nn, 2, NFSD_TEST) || nfsd_vers(nn, 3, NFSD_TEST); > } > > -- > 2.33.1 >
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index ccb59e91011b..7486a6f5fc21 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -340,8 +340,19 @@ static void nfsd_shutdown_generic(void) nfsd_file_cache_shutdown(); } +/* + * Allow admin to disable lockd. This would typically be used to allow (e.g.) + * a userspace NLM server of some sort to be used. + */ +static bool nfsd_disable_lockd = false; +module_param(nfsd_disable_lockd, bool, 0644); +MODULE_PARM_DESC(nfsd_disable_lockd, "Allow lockd to be manually disabled."); + static bool nfsd_needs_lockd(struct nfsd_net *nn) { + if (nfsd_disable_lockd) + return false; + return nfsd_vers(nn, 2, NFSD_TEST) || nfsd_vers(nn, 3, NFSD_TEST); }