Page MenuHomeFreeBSD

nfsd: don't report rpcb_unset() failures for NFSv4 only configuration
ClosedPublic

Authored by rmacklem on Mar 27 2021, 8:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 10:53 PM
Unknown Object (File)
Sat, Apr 27, 6:08 PM
Unknown Object (File)
Fri, Apr 26, 3:15 AM
Unknown Object (File)
Tue, Apr 23, 12:46 AM
Unknown Object (File)
Tue, Apr 23, 12:46 AM
Unknown Object (File)
Tue, Apr 23, 12:34 AM
Unknown Object (File)
Fri, Apr 19, 1:09 PM
Unknown Object (File)
Mar 27 2024, 6:41 PM
Subscribers
None

Details

Summary

An NFSv4 only configuration does not register with
rpcbind(). Without this patch a failure to rpcb_unset()
is reported when the daemon is terminated for this case.

This is harmless noise, but this patch avoids calling
rpcb_unset() for the NFSv4 only case, avoiding the noise.

When called with "-d", it still does the rpcb_unset(),
assuming that the configuration might have been
changed to NFSv4 only and unregistering with
rpcbind() might still be needed.

Test Plan

Tested by terminating the nfsd daemon for both
the NFSv4 only and non-NFSv4 only configurations.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rmacklem created this revision.
usr.sbin/nfsd/nfsd.c
313

Why is this moved above where nfs_minvers gets set?

Please add a comment to explain that calling unregistration() before fetching nfs_minvers from the sysctl is intentional when you commit.

usr.sbin/nfsd/nfsd.c
313

Ah this is how you achieved "still does the rpcb_unset(),
assuming that the configuration might have been
changed to NFSv4 only and unregistering with
rpcbind() might still be needed."

This revision is now accepted and ready to land.Apr 1 2021, 3:50 PM