* [nfs-utils PATCH 1/3] configure: update check of system netlink headers
2026-07-07 20:57 [nfs-utils PATCH 0/3] mountd netlink fixes Scott Mayhew
@ 2026-07-07 20:57 ` Scott Mayhew
2026-07-07 20:57 ` [nfs-utils PATCH 2/3] nfs.conf: add no-netlink option to exportd and mountd stanzas Scott Mayhew
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Scott Mayhew @ 2026-07-07 20:57 UTC (permalink / raw)
To: steved; +Cc: jlayton, linux-nfs
Commit e1401387 ("nfsstat: add netlink support for fetching server
statistics") added new symbols to support/include/nfsd_netlink.h
that have not yet been added to the kernel headers. Update the check
that defines USE_SYSTEM_NFSD_NETLINK_H - otherwise nfsstat will fail
to compile.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8ca06fd6..4ca7666d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,9 +259,9 @@ AC_CHECK_HEADERS(linux/nfsd_netlink.h)
AC_DEFINE([HAVE_NFSD_NETLINK], 1,
[Define to 1 if nfsd generic netlink support is available])
-# ensure we have the expkey attributes
+# ensure the system netlink headers have the latest features
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/nfsd_netlink.h>]],
- [[int foo = NFSD_A_EXPKEY_SEQNO;]])],
+ [[int foo = NFSD_CMD_SERVER_STATS_GET;]])],
[AC_DEFINE([USE_SYSTEM_NFSD_NETLINK_H], 1,
["Use system's linux/nfsd_netlink.h"])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/lockd_netlink.h>]],
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [nfs-utils PATCH 2/3] nfs.conf: add no-netlink option to exportd and mountd stanzas
2026-07-07 20:57 [nfs-utils PATCH 0/3] mountd netlink fixes Scott Mayhew
2026-07-07 20:57 ` [nfs-utils PATCH 1/3] configure: update check of system netlink headers Scott Mayhew
@ 2026-07-07 20:57 ` Scott Mayhew
2026-07-07 20:57 ` [nfs-utils PATCH 3/3] mountd/exportd: disable netlink when falling back to /proc Scott Mayhew
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Scott Mayhew @ 2026-07-07 20:57 UTC (permalink / raw)
To: steved; +Cc: jlayton, linux-nfs
This option was added by commit 60c38383 ("mountd/exportd/exportfs:
add --no-netlink option to disable netlink"), but nfs.conf was not
updated.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
nfs.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nfs.conf b/nfs.conf
index 84cc653f..fa12c592 100644
--- a/nfs.conf
+++ b/nfs.conf
@@ -43,6 +43,8 @@
# threads=1
# cache-use-ipaddr=n
# ttl=1800
+# no-netlink=0
+#
[mountd]
# debug="all|auth|call|general|parse"
# apply-root-cred=n
@@ -55,6 +57,7 @@
# ha-callout=
# cache-use-ipaddr=n
# ttl=1800
+# no-netlink=0
#
[nfsdcld]
# debug=0
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [nfs-utils PATCH 3/3] mountd/exportd: disable netlink when falling back to /proc
2026-07-07 20:57 [nfs-utils PATCH 0/3] mountd netlink fixes Scott Mayhew
2026-07-07 20:57 ` [nfs-utils PATCH 1/3] configure: update check of system netlink headers Scott Mayhew
2026-07-07 20:57 ` [nfs-utils PATCH 2/3] nfs.conf: add no-netlink option to exportd and mountd stanzas Scott Mayhew
@ 2026-07-07 20:57 ` Scott Mayhew
2026-07-07 21:12 ` [nfs-utils PATCH 0/3] mountd netlink fixes Jeff Layton
2026-07-11 16:19 ` Steve Dickson
4 siblings, 0 replies; 6+ messages in thread
From: Scott Mayhew @ 2026-07-07 20:57 UTC (permalink / raw)
To: steved; +Cc: jlayton, linux-nfs
If cache_flush() has to fall back to the /proc interface, then there's a
good chance that the netlink interface isn't going to work, so go ahead
and disable it.
The netlink interface requires CAP_NET_ADMIN, which requires a policy
update on systems running SELinux. If SELinux blocks mountd from using
the netlink interface and there's no fallback, then mount requests just
hang.
Also, when falling back, close both the sunrpc and the nfsd netlink
sockets.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
support/export/cache.c | 7 +++++++
support/export/cache_flush.c | 1 +
2 files changed, 8 insertions(+)
diff --git a/support/export/cache.c b/support/export/cache.c
index 65008f51..059f48a7 100644
--- a/support/export/cache.c
+++ b/support/export/cache.c
@@ -3072,6 +3072,8 @@ void cache_open(void)
* were queued before we opened the socket.
*/
auth_reload();
+ if (no_netlink)
+ goto fallback;
cache_nl_process_export();
cache_nl_process_expkey();
cache_nl_process_ip_map();
@@ -3079,11 +3081,16 @@ void cache_open(void)
cache_nl_process_unix_gid();
return;
}
+fallback:
xlog(L_NOTICE, "sunrpc netlink family unavailable, falling back to /proc");
nl_socket_free(nfsd_nl_notify_sock);
nfsd_nl_notify_sock = NULL;
nl_socket_free(nfsd_nl_cmd_sock);
nfsd_nl_cmd_sock = NULL;
+ nl_socket_free(sunrpc_nl_notify_sock);
+ sunrpc_nl_notify_sock = NULL;
+ nl_socket_free(sunrpc_nl_cmd_sock);
+ sunrpc_nl_cmd_sock = NULL;
}
for (i=0; cachelist[i].cache_name; i++ ) {
diff --git a/support/export/cache_flush.c b/support/export/cache_flush.c
index 2a24dec7..046e6917 100644
--- a/support/export/cache_flush.c
+++ b/support/export/cache_flush.c
@@ -164,5 +164,6 @@ cache_flush(void)
return;
}
/* Fallback: /proc path */
+ no_netlink = 1;
cache_proc_flush();
}
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [nfs-utils PATCH 0/3] mountd netlink fixes
2026-07-07 20:57 [nfs-utils PATCH 0/3] mountd netlink fixes Scott Mayhew
` (2 preceding siblings ...)
2026-07-07 20:57 ` [nfs-utils PATCH 3/3] mountd/exportd: disable netlink when falling back to /proc Scott Mayhew
@ 2026-07-07 21:12 ` Jeff Layton
2026-07-11 16:19 ` Steve Dickson
4 siblings, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2026-07-07 21:12 UTC (permalink / raw)
To: Scott Mayhew, steved; +Cc: linux-nfs
On Tue, 2026-07-07 at 16:57 -0400, Scott Mayhew wrote:
> A handful of fixes for some issues I ran into on Fedora Rawhide.
>
> Scott Mayhew (3):
> configure: update check of system netlink headers
> nfs.conf: add no-netlink option to exportd and mountd stanzas
> mountd/exportd: disable netlink when falling back to /proc
>
> configure.ac | 4 ++--
> nfs.conf | 3 +++
> support/export/cache.c | 7 +++++++
> support/export/cache_flush.c | 1 +
> 4 files changed, 13 insertions(+), 2 deletions(-)
These all look good to me. Nice work, Scott.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [nfs-utils PATCH 0/3] mountd netlink fixes
2026-07-07 20:57 [nfs-utils PATCH 0/3] mountd netlink fixes Scott Mayhew
` (3 preceding siblings ...)
2026-07-07 21:12 ` [nfs-utils PATCH 0/3] mountd netlink fixes Jeff Layton
@ 2026-07-11 16:19 ` Steve Dickson
4 siblings, 0 replies; 6+ messages in thread
From: Steve Dickson @ 2026-07-11 16:19 UTC (permalink / raw)
To: Scott Mayhew; +Cc: jlayton, linux-nfs
On 7/7/26 4:57 PM, Scott Mayhew wrote:
> A handful of fixes for some issues I ran into on Fedora Rawhide.
>
> Scott Mayhew (3):
> configure: update check of system netlink headers
> nfs.conf: add no-netlink option to exportd and mountd stanzas
> mountd/exportd: disable netlink when falling back to /proc
>
> configure.ac | 4 ++--
> nfs.conf | 3 +++
> support/export/cache.c | 7 +++++++
> support/export/cache_flush.c | 1 +
> 4 files changed, 13 insertions(+), 2 deletions(-)
>
Committed... (tag: nfs-utils-2-9-2-rc5)
steved.
^ permalink raw reply [flat|nested] 6+ messages in thread