git: 7f97e3f47149 - stable/13 - Add man page for nfslockd.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Tue, 14 May 2024 06:59:24 UTC
The branch stable/13 has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=7f97e3f47149ee44b06e3877f1bab1834c6a9307

commit 7f97e3f47149ee44b06e3877f1bab1834c6a9307
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2024-05-10 09:23:13 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2024-05-14 06:59:12 +0000

    Add man page for nfslockd.
    
    PR:             130238
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D45139
    
    (cherry picked from commit 44e72c6e2e6bcfa2cba89afb92fa05f6ac4d5660)
---
 share/man/man4/Makefile        |  1 +
 share/man/man4/nfslockd.4      | 45 ++++++++++++++++++++++++++++++++++++++++++
 usr.sbin/rpc.lockd/lockd.c     |  3 ++-
 usr.sbin/rpc.lockd/rpc.lockd.8 |  5 +++--
 4 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 83bec8e9f66a..1ea3431c859a 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -343,6 +343,7 @@ MAN=	aac.4 \
 	netlink.4 \
 	netmap.4 \
 	${_nfe.4} \
+	nfslockd.4 \
 	${_nfsmb.4} \
 	ng_async.4 \
 	ngatmbase.4 \
diff --git a/share/man/man4/nfslockd.4 b/share/man/man4/nfslockd.4
new file mode 100644
index 000000000000..770d9b8736b0
--- /dev/null
+++ b/share/man/man4/nfslockd.4
@@ -0,0 +1,45 @@
+.\"-
+.\" Copyright (c) 2024 Dag-Erling Smørgrav
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd May 8, 2024
+.Dt NFSLOCKD 4
+.Os
+.Sh NAME
+.Nm nfslockd
+.Nd NFS advisory locking
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options NFSLOCKD"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nfslockd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides kernel support for NFSv3 advisory locking.
+It works in tandem with
+.Xr rpc.lockd 8 ,
+which will normally load it on startup if it is not already loaded or
+compiled-in.
+.Sh SEE ALSO
+.Xr rpc.lockd 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.4 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Doug Rabson Aq Mt dfr@FreeBSD.org .
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index 35953f32692e..15448b651749 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -188,7 +188,8 @@ main(int argc, char **argv)
 	kernel_lockd_client = FALSE;
 	if (modfind("nfslockd") < 0) {
 		if (kldload("nfslockd") < 0) {
-			fprintf(stderr, "Can't find or load kernel support for rpc.lockd - using non-kernel implementation\n");
+			fprintf(stderr, "Unable to load nfslockd(4), "
+			    "using userland implementation\n");
 		} else {
 			kernel_lockd = TRUE;
 		}
diff --git a/usr.sbin/rpc.lockd/rpc.lockd.8 b/usr.sbin/rpc.lockd/rpc.lockd.8
index 89f55087901d..89592a1cceaf 100644
--- a/usr.sbin/rpc.lockd/rpc.lockd.8
+++ b/usr.sbin/rpc.lockd/rpc.lockd.8
@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 21, 2019
+.Dd May 8, 2024
 .Dt RPC.LOCKD 8
 .Os
 .Sh NAME
@@ -44,7 +44,7 @@
 The
 .Nm
 utility provides monitored and unmonitored file and record locking services
-in an NFS environment.
+in an NFSv3 environment.
 To monitor the status of hosts requesting locks,
 the locking daemon typically operates in conjunction
 with
@@ -137,6 +137,7 @@ RPC protocol specification for the network lock manager protocol.
 .El
 .Sh SEE ALSO
 .Xr syslog 3 ,
+.Xr nfslockd 4 ,
 .Xr rc.conf 5 ,
 .Xr rpc.statd 8
 .Sh STANDARDS