Page MenuHomeFreeBSD

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

Authored by rmacklem on Mar 27 2021, 8:24 PM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

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
312

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