Skip to content

exportfs/exportd/mountd: allow them to use netlink for up/downcalls

Jeff Layton linux-nfs 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20260316-exportd-netlink-a53bf66ae034

Versions newest first

  1. v2 Latest16 patches 1 replyIn review
  2. v117 patches 1 replySuperseded

Changes in v2 from the cover letter

- Consolidate UAPI header updates into one patch
- Rebase onto nfs-utils-2-9-1-rc2
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16nfsdctl: move *_netlink.h to support/include/support/include/Makefile.am support/include/lockd_netlink.h support/include/nfsd_netlink.h+4 -20 replies
2/16support/export: remove unnecessary static variables in nfsd_fh expkey lookupsupport/export/cache.c+3 -30 replies
3/16exportfs: remove obsolete legacy mode documentation from manpageutils/exportfs/exportfs.man+2 -270 replies
4/16support/include: update netlink headers for all cache upcallssupport/include/Makefile.am support/include/nfsd_netlink.h support/include/sunrpc_netlink.h+226 -00 replies
5/16build: add libnl3 and netlink header support for exportd and mountdconfigure.ac support/export/Makefile.am utils/exportd/Makefile.am +1 more+23 -170 replies
6/16xlog: claim D_FAC3 as D_NETLINKsupport/include/xlog.h+1 -10 replies
7/16exportd/mountd: add netlink support for svc_export cachesupport/export/cache.c+558 -20 replies
8/16exportd/mountd: add netlink support for the nfsd.fh cachesupport/export/cache.c+314 -90 replies
9/16exportd/mountd: add netlink support for the auth.unix.ip cachesupport/export/cache.c+342 -240 replies
10/16exportd/mountd: add netlink support for the auth.unix.gid cachesupport/export/cache.c+236 -00 replies
11/16mountd/exportd: only use /proc interfaces if netlink setup failssupport/export/cache.c+10 -20 replies
12/16support/export: check for pending requests after opening netlink socketssupport/export/cache.c+12 -10 replies
13/16exportd/mountd: use cache type from notifications to target scanningsupport/export/cache.c+66 -150 replies
14/16exportfs: add netlink support for cache flush with /proc fallbacksupport/export/Makefile.am support/export/cache_flush.c support/nfs/cacheio.c+166 -490 replies
15/16exportfs: use netlink to probe kernel support, skip export_testutils/exportfs/Makefile.am utils/exportfs/exportfs.c+45 -30 replies
16/16mountd/exportd/exportfs: add --no-netlink option to disable netlinksupport/export/cache.c support/export/cache_flush.c utils/exportd/exportd.c +5 more+102 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH nfs-utils v2 00/16] exportfs/exportd/mountd: allow them to use netlink for up/downcalls

Minor revision to rebase onto recent upstream changes. Original cover letter follows:

This adds support for the new netlink-based upcalls and downcalls in mountd, exportd and exportfs. With this, mountd is no longer reliant on /proc for sunrpc cache upcalls.

There are also a few bugfixes and cleanups for existing code and documentation too.

---
Changes in v2:
- Consolidate UAPI header updates into one patch
- Rebase onto nfs-utils-2-9-1-rc2
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jeff Layton (16):
nfsdctl: move *_netlink.h to support/include/
support/export: remove unnecessary static variables in nfsd_fh expkey lookup
exportfs: remove obsolete legacy mode documentation from manpage support/include: update netlink headers for all cache upcalls
build: add libnl3 and netlink header support for exportd and mountd
xlog: claim D_FAC3 as D_NETLINK
exportd/mountd: add netlink support for svc_export cache exportd/mountd: add netlink support for the nfsd.fh cache exportd/mountd: add netlink support for the auth.unix.ip cache exportd/mountd: add netlink support for the auth.unix.gid cache mountd/exportd: only use /proc interfaces if netlink setup fails support/export: check for pending requests after opening netlink sockets exportd/mountd: use cache type from notifications to target scanning
exportfs: add netlink support for cache flush with /proc fallback
exportfs: use netlink to probe kernel support, skip export_test mountd/exportd/exportfs: add --no-netlink option to disable netlink

 configure.ac                                       |   33 +-
 support/export/Makefile.am                         |    5 +-
 support/export/cache.c                             | 1892 +++++++++++++++++---
 support/export/cache_flush.c                       |  166 ++
 support/include/Makefile.am                        |    7 +-
 {utils/nfsdctl => support/include}/lockd_netlink.h |    0
 support/include/nfsd_netlink.h                     |  240 +++
 support/include/sunrpc_netlink.h                   |   84 +
 support/include/xlog.h                             |    2 +-
 support/nfs/cacheio.c                              |   49 +-
 utils/exportd/Makefile.am                          |    2 +-
 utils/exportd/exportd.c                            |   10 +-
 utils/exportd/exportd.man                          |   12 +-
 utils/exportfs/Makefile.am                         |    6 +-
 utils/exportfs/exportfs.c                          |   55 +-
 utils/exportfs/exportfs.man                        |   79 +-
 utils/mountd/Makefile.am                           |    2 +-
 utils/mountd/mountd.c                              |    9 +-
 utils/mountd/mountd.man                            |    9 +
 utils/nfsdctl/nfsd_netlink.h                       |   99 -
 20 files changed, 2350 insertions(+), 411 deletions(-)

---
base-commit: a06a3251c2eb1316f781149f8b7f9acd9d41e7fc
change-id: 20260316-exportd-netlink-a53bf66ae034

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>