[v2,0/6] Allow containerised knfsd to set supported NFS versions
mbox series

Message ID 20190409154619.33615-1-trond.myklebust@hammerspace.com
Headers show
Series
  • Allow containerised knfsd to set supported NFS versions
Related show

Message

Trond Myklebust April 9, 2019, 3:46 p.m. UTC
The current knfsd implementation is unable to support containers that
want to run different combinations of NFS versions. This is because of
the way we define which versions are supported: by directly editing the
global version table in 'nfsd_program'.
The following patch set modifies the method used to define version
information by moving some of the server RPC request initialisation
down into knfsd itself, allowing it to manage the version-specific
initialisation.

Note that we might want to consider a few follow ups to this patchset
to get rid of some of the version-specific flags (e.g. vs_hidden) that
currently need to be managed in the generic SUNRPC server code on behalf
of just one or two RPC programs. These flags can easily by replaced by
custom RPC request initialisers.

---
v2: Fix compile issues when CONFIG_NFSD_V2_ACL and CONFIG_NFSD_V3_ACL
    are undefined.
    Don't move the svc_reserve() call in svc_process_common(), since
    that can trigger 'RPC request reserved xxx but used yyy' issues.


Trond Myklebust (6):
  SUNRPC/nfs: Fix return value for nfs4_callback_compound()
  SUNRPC: Add a callback to initialise server requests
  SUNRPC: Clean up generic dispatcher code
  SUNRPC: Allow further customisation of RPC program registration
  nfsd: Add custom rpcbind callbacks for knfsd
  nfsd: Allow containers to set supported nfs versions

 fs/lockd/svc.c             |   4 +-
 fs/nfs/callback.c          |   2 +
 fs/nfs/callback_xdr.c      |   2 +-
 fs/nfsd/netns.h            |   8 +
 fs/nfsd/nfs4proc.c         |   3 +-
 fs/nfsd/nfsctl.c           |  25 ++--
 fs/nfsd/nfsd.h             |   8 +-
 fs/nfsd/nfssvc.c           | 255 +++++++++++++++++++++++++------
 include/linux/sunrpc/svc.h |  33 ++++
 net/sunrpc/svc.c           | 298 ++++++++++++++++++++++++-------------
 10 files changed, 478 insertions(+), 160 deletions(-)

Comments

J. Bruce Fields April 9, 2019, 8:09 p.m. UTC | #1
On Tue, Apr 09, 2019 at 11:46:13AM -0400, Trond Myklebust wrote:
> The current knfsd implementation is unable to support containers that
> want to run different combinations of NFS versions. This is because of
> the way we define which versions are supported: by directly editing the
> global version table in 'nfsd_program'.
> The following patch set modifies the method used to define version
> information by moving some of the server RPC request initialisation
> down into knfsd itself, allowing it to manage the version-specific
> initialisation.
> 
> Note that we might want to consider a few follow ups to this patchset
> to get rid of some of the version-specific flags (e.g. vs_hidden) that
> currently need to be managed in the generic SUNRPC server code on behalf
> of just one or two RPC programs. These flags can easily by replaced by
> custom RPC request initialisers.
> 
> ---
> v2: Fix compile issues when CONFIG_NFSD_V2_ACL and CONFIG_NFSD_V3_ACL
>     are undefined.
>     Don't move the svc_reserve() call in svc_process_common(), since
>     that can trigger 'RPC request reserved xxx but used yyy' issues.

Thanks!  I've applied this revised version.

--b.

> 
> 
> Trond Myklebust (6):
>   SUNRPC/nfs: Fix return value for nfs4_callback_compound()
>   SUNRPC: Add a callback to initialise server requests
>   SUNRPC: Clean up generic dispatcher code
>   SUNRPC: Allow further customisation of RPC program registration
>   nfsd: Add custom rpcbind callbacks for knfsd
>   nfsd: Allow containers to set supported nfs versions
> 
>  fs/lockd/svc.c             |   4 +-
>  fs/nfs/callback.c          |   2 +
>  fs/nfs/callback_xdr.c      |   2 +-
>  fs/nfsd/netns.h            |   8 +
>  fs/nfsd/nfs4proc.c         |   3 +-
>  fs/nfsd/nfsctl.c           |  25 ++--
>  fs/nfsd/nfsd.h             |   8 +-
>  fs/nfsd/nfssvc.c           | 255 +++++++++++++++++++++++++------
>  include/linux/sunrpc/svc.h |  33 ++++
>  net/sunrpc/svc.c           | 298 ++++++++++++++++++++++++-------------
>  10 files changed, 478 insertions(+), 160 deletions(-)
> 
> -- 
> 2.20.1