Skip to content

version handling fixes for nfsdctl and rpc.nfsd

Scott Mayhew linux-nfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v22 patches 3 repliesSuperseded
  3. v11 patch 6 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nfsdctl: tweak the version subcommand behaviorutils/nfsdctl/nfsdctl.c+32 -40 replies
2/3nfsdctl: tweak the nfs.conf version handlingutils/nfsdctl/nfsdctl.c+42 -80 replies
3/3nfsd: fix version sanity checkutils/nfsd/nfsd.c+24 -50 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [nfs-utils PATCH v3 0/3] version handling fixes for nfsdctl and rpc.nfsd

Two changes in how nfsdctl does version handling and one for rpc.nfsd.

The first patch makes the 'nfsdctl version' command behave according to the man page for w.r.t handling +4/-4, e.g.

# utils/nfsdctl/nfsdctl
nfsdctl> threads 0
nfsdctl> version
+3.0 +4.0 +4.1 +4.2
nfsdctl> version -4
nfsdctl> version
+3.0 -4.0 -4.1 -4.2
nfsdctl> version +4
nfsdctl> version
+3.0 +4.0 +4.1 +4.2
nfsdctl> version -4 +4.2
nfsdctl> version
+3.0 -4.0 -4.1 +4.2
nfsdctl> ^D

The second patch makes nfsdctl's handling of the nfsd version options in nfs.conf behave like rpc.nfsd's. This is important since the systemd service file will fall back to rpc.nfsd if nfsdctl fails. Note that the v3 version of this patch also makes 'nfsdctl autostart' fail with an error if no versions and no minor versions are enabled in nfs.conf.

The third patch (also new in this v3 posting) makes rpc.nfsd consider the 'minorvers' bit field when determining whether any versions have been enabled. This takes care of two scenarios:
1) When vers4=y but vers4.0=vers4.1=vers4.2=n
2) When vers2=vers3=vers4=n but any of vers4.0/vers4.1/vers4.2=y

-Scott

Scott Mayhew (3):
nfsdctl: tweak the version subcommand behavior
nfsdctl: tweak the nfs.conf version handling
nfsd: fix version sanity check

 utils/nfsd/nfsd.c       | 29 +++++++++++---
 utils/nfsdctl/nfsdctl.c | 86 +++++++++++++++++++++++++++++++++++------
 2 files changed, 98 insertions(+), 17 deletions(-)
Signature · 1 line
2.45.2