Skip to content

nfsdctl: properly handle older kernels that don't support min-threads

Jeff Layton linux-nfs 2 versions In review

Get series with b4
b4 am [email protected] change-id 20260203-minthreads-402ce87096e0

Versions newest first

  1. v2 Latest4 patches 4 repliesIn review
  2. v13 patches 1 replySuperseded

Changes in v2 from the cover letter

- Add patch to unconditionally compile in min-threads support
- Make getpolicy_handler() return NL_SKIP
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4nfsdctl: unconditionally enable support for min-threadsconfigure.ac utils/nfsdctl/nfsd_netlink.h utils/nfsdctl/nfsdctl.c+5 -190 replies
2/4nfsdctl: only resolve netlink family names onceutils/nfsdctl/nfsdctl.c+64 -190 replies
3/4nfsdctl: query netlink policy before sending the minthreads attribute to kernelutils/nfsdctl/nfsdctl.c+94 -10 replies
4/4nfsdctl: remove unneeded newlines from xlog() format stringsutils/nfsdctl/nfsdctl.c+5 -50 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBenjamin Coddington
SeriesR-b T-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH nfs-utils v2 0/4] nfsdctl: properly handle older kernels that don't support min-threads

Ben reported a problem with using new userland with old kernel. If he tried to send down a setting that the kernel doesn't support, it returns -EINVAL to the call.

This patch series adds a mechanism for nfsdctl to tell what attributes are supported by the "threads" command. If can then use that to determine whether to pass down the min-threads attribute or report an error or warning.

This also removes the dependency on the UAPI headers by properly maintaining the private nfsd_netlink.h file.

---
Changes in v2:
- Add patch to unconditionally compile in min-threads support
- Make getpolicy_handler() return NL_SKIP
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jeff Layton (4):
nfsdctl: unconditionally enable support for min-threads
nfsdctl: only resolve netlink family names once
nfsdctl: query netlink policy before sending the minthreads attribute to kernel
nfsdctl: remove unneeded newlines from xlog() format strings

 configure.ac                 |   6 +-
 utils/nfsdctl/nfsd_netlink.h |   2 +
 utils/nfsdctl/nfsdctl.c      | 204 ++++++++++++++++++++++++++++++++++---------
 3 files changed, 168 insertions(+), 44 deletions(-)

---
base-commit: 8f54511aefe1455161a6c4406ed8c770139f61e3
change-id: 20260203-minthreads-402ce87096e0

Best regards,

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