public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>,
	 Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>,  Tom Talpey <tom@talpey.com>
Cc: Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	 linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Jeff Layton <jlayton@kernel.org>
Subject: [PATCH 00/14] nfsd/sunrpc: add support for netlink upcalls for mountd/exportd
Date: Mon, 16 Mar 2026 11:14:34 -0400	[thread overview]
Message-ID: <20260316-exportd-netlink-v1-0-6125dc62b955@kernel.org> (raw)

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:

Most notably, it's very difficult to extend to add support for new
export options. There is also the matter of requiring /proc which is not
always desirable in a container.

This patchset adds new netlink-based interfaces for handling the sunrpc
cache upcalls. The basic idea is to add a new "cache_notify" operation
to struct cache_detail. That causes the kernel to send a notification to
userland which then fetches any outstanding cache_requests and then
responds to them via netlink.

There is also a companion patchset for nfs-utils that adds the necessary
support for these interfaces to mountd/exportd and exportfs.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (14):
      nfsd: move struct nfsd_genl_rqstp to nfsctl.c
      sunrpc: rename sunrpc_cache_pipe_upcall() to sunrpc_cache_upcall()
      sunrpc: rename sunrpc_cache_pipe_upcall_timeout()
      sunrpc: rename cache_pipe_upcall() to cache_do_upcall()
      sunrpc: add a cache_notify callback
      sunrpc: add helpers to count and snapshot pending cache requests
      sunrpc: add a generic netlink family for cache upcalls
      sunrpc: add netlink upcall for the auth.unix.ip cache
      sunrpc: add netlink upcall for the auth.unix.gid cache
      nfsd: add new netlink spec for svc_export upcall
      nfsd: add netlink upcall for the svc_export cache
      nfsd: add netlink upcall for the nfsd.fh cache
      sunrpc: add SUNRPC_CMD_CACHE_FLUSH netlink command
      nfsd: add NFSD_CMD_CACHE_FLUSH netlink command

 Documentation/netlink/specs/nfsd.yaml         | 239 +++++++++
 Documentation/netlink/specs/sunrpc_cache.yaml | 149 ++++++
 fs/nfs/dns_resolve.c                          |   2 +-
 fs/nfsd/export.c                              | 707 +++++++++++++++++++++++++-
 fs/nfsd/netlink.c                             | 109 +++-
 fs/nfsd/netlink.h                             |  18 +
 fs/nfsd/nfs4idmap.c                           |   4 +-
 fs/nfsd/nfsctl.c                              |  75 +++
 fs/nfsd/nfsd.h                                |  17 +-
 include/linux/sunrpc/cache.h                  |  12 +-
 include/uapi/linux/nfsd_netlink.h             | 133 +++++
 include/uapi/linux/sunrpc_netlink.h           |  84 +++
 net/sunrpc/Makefile                           |   2 +-
 net/sunrpc/auth_gss/svcauth_gss.c             |   2 +-
 net/sunrpc/cache.c                            |  76 ++-
 net/sunrpc/netlink.c                          | 144 ++++++
 net/sunrpc/netlink.h                          |  38 ++
 net/sunrpc/sunrpc_syms.c                      |  10 +
 net/sunrpc/svcauth_unix.c                     | 506 +++++++++++++++++-
 19 files changed, 2287 insertions(+), 40 deletions(-)
---
base-commit: e344b49528c8ef457ee714bb65e2da4c121132c2
change-id: 20260316-exportd-netlink-1c9fb52536e3

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


             reply	other threads:[~2026-03-16 15:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 15:14 Jeff Layton [this message]
2026-03-16 15:14 ` [PATCH 01/14] nfsd: move struct nfsd_genl_rqstp to nfsctl.c Jeff Layton
2026-03-16 15:14 ` [PATCH 02/14] sunrpc: rename sunrpc_cache_pipe_upcall() to sunrpc_cache_upcall() Jeff Layton
2026-03-16 15:14 ` [PATCH 03/14] sunrpc: rename sunrpc_cache_pipe_upcall_timeout() Jeff Layton
2026-03-16 15:14 ` [PATCH 04/14] sunrpc: rename cache_pipe_upcall() to cache_do_upcall() Jeff Layton
2026-03-19 13:54   ` Chuck Lever
2026-03-16 15:14 ` [PATCH 05/14] sunrpc: add a cache_notify callback Jeff Layton
2026-03-19 15:13   ` Chuck Lever
2026-03-16 15:14 ` [PATCH 06/14] sunrpc: add helpers to count and snapshot pending cache requests Jeff Layton
2026-03-19 18:07   ` Chuck Lever
2026-03-19 18:22     ` Jeff Layton
2026-03-19 18:47       ` Chuck Lever
2026-03-16 15:14 ` [PATCH 07/14] sunrpc: add a generic netlink family for cache upcalls Jeff Layton
2026-03-19 18:44   ` Chuck Lever
2026-03-19 19:14   ` Chuck Lever
2026-03-19 19:19     ` Jeff Layton
2026-03-19 19:20       ` Chuck Lever
2026-03-19 19:31         ` Chuck Lever
2026-03-16 15:14 ` [PATCH 08/14] sunrpc: add netlink upcall for the auth.unix.ip cache Jeff Layton
2026-03-16 15:14 ` [PATCH 09/14] sunrpc: add netlink upcall for the auth.unix.gid cache Jeff Layton
2026-03-20 14:32   ` Chuck Lever
2026-03-16 15:14 ` [PATCH 10/14] nfsd: add new netlink spec for svc_export upcall Jeff Layton
2026-03-20 15:17   ` Chuck Lever
2026-03-23 20:00     ` Jeff Layton
2026-03-16 15:14 ` [PATCH 11/14] nfsd: add netlink upcall for the svc_export cache Jeff Layton
2026-03-16 15:14 ` [PATCH 12/14] nfsd: add netlink upcall for the nfsd.fh cache Jeff Layton
2026-03-16 15:14 ` [PATCH 13/14] sunrpc: add SUNRPC_CMD_CACHE_FLUSH netlink command Jeff Layton
2026-03-16 15:14 ` [PATCH 14/14] nfsd: add NFSD_CMD_CACHE_FLUSH " Jeff Layton

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=20260316-exportd-netlink-v1-0-6125dc62b955@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    /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