[PATCH v2 00/13] nfsd/sunrpc: add support for netlink upcalls for mountd/exportd

Jeff Layton posted 13 patches 1 week, 1 day ago
Documentation/netlink/specs/nfsd.yaml         | 241 +++++++++
Documentation/netlink/specs/sunrpc_cache.yaml | 149 ++++++
fs/nfs/dns_resolve.c                          |   2 +-
fs/nfsd/export.c                              | 713 +++++++++++++++++++++++++-
fs/nfsd/netlink.c                             | 107 ++++
fs/nfsd/netlink.h                             |  18 +
fs/nfsd/nfs4idmap.c                           |   4 +-
fs/nfsd/nfsctl.c                              |  79 +++
fs/nfsd/nfsd.h                                |  17 +-
include/linux/sunrpc/cache.h                  |  15 +-
include/uapi/linux/nfsd_netlink.h             | 141 +++++
include/uapi/linux/sunrpc_netlink.h           |  84 +++
net/sunrpc/Makefile                           |   2 +-
net/sunrpc/auth_gss/svcauth_gss.c             |   2 +-
net/sunrpc/cache.c                            | 127 ++++-
net/sunrpc/netlink.c                          | 111 ++++
net/sunrpc/netlink.h                          |  35 ++
net/sunrpc/sunrpc_syms.c                      |  10 +
net/sunrpc/svcauth_unix.c                     | 516 ++++++++++++++++++-
19 files changed, 2332 insertions(+), 41 deletions(-)
Re: [PATCH v2 00/13] nfsd/sunrpc: add support for netlink upcalls for mountd/exportd
Posted by Chuck Lever 2 hours ago
From: Chuck Lever <chuck.lever@oracle.com>

On Wed, 25 Mar 2026 10:40:21 -0400, Jeff Layton wrote:
> This version should address most of Chuck's review comments. The
> userland patch series is unchanged. I've added the netdev folks this
> time too in order to get more experienced eyes on the netlink bits.
> 
> Original cover letter follows:
> 
> mountd/exportd use the sunrpc cache mechanism for some of its internal
> caches that are populated by userland. These currently use some very
> antiquated interfaces in /proc to handle upcalls and downcalls. While it
> has worked well for decades and is relatively stable, it has some
> problems.
> 
> [...]

Applied to nfsd-testing, thanks!

[01/13] nfsd: move struct nfsd_genl_rqstp to nfsctl.c
        commit: 9255d64c38df86b504fd9928c4599f506e0e9a5f
[02/13] sunrpc: rename sunrpc_cache_pipe_upcall() to sunrpc_cache_upcall()
        commit: 296a9a594de51e5d4f875a56ece878dab3a4afd0
[03/13] sunrpc: rename sunrpc_cache_pipe_upcall_timeout()
        commit: 4695f0a549afde54672311ff3b70e4a8c9f67ee4
[04/13] sunrpc: rename cache_pipe_upcall() to cache_do_upcall()
        commit: 9699085b61700e040ddb500828cf5430e0a9f7f3
[05/13] sunrpc: add a cache_notify callback
        commit: 0f2e29eb49430fba0ddcc9f0a8fb10334751e9f8
[06/13] sunrpc: add helpers to count and snapshot pending cache requests
        commit: d5d861c2a0340a70c869b5688c57741564956875
[07/13] sunrpc: add a generic netlink family for cache upcalls
        commit: 44139e2b768b1bfd9fcc8fbefdcc5a425ef448cf
[08/13] sunrpc: add netlink upcall for the auth.unix.ip cache
        commit: 8f056ebed4272238de8f003925d91bdb4e6726ae
[09/13] sunrpc: add netlink upcall for the auth.unix.gid cache
        commit: 6bfbaa6d611bcde1d62435982a2d8895ca0082e8
[10/13] nfsd: add netlink upcall for the svc_export cache
        commit: cfefcaec25438cc82344ac3ea22c474798e05531
[11/13] nfsd: add netlink upcall for the nfsd.fh cache
        commit: dbd292f2d787b7ae0d471da9783996eb8eea759e
[12/13] sunrpc: add SUNRPC_CMD_CACHE_FLUSH netlink command
        commit: e91b082fdae41cdeb73772aeeee2f61937d14c65
[13/13] nfsd: add NFSD_CMD_CACHE_FLUSH netlink command
        commit: 895a916e2c31d86a11b867c16ac0e4e167298e5e

--
Chuck Lever