From 44e72c6e2e6bcfa2cba89afb92fa05f6ac4d5660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 10 May 2024 11:23:13 +0200 Subject: [PATCH] Add man page for nfslockd. PR: 130238 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45139 --- 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(-) create mode 100644 share/man/man4/nfslockd.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index c5ba7e46deb8..5deb4ddea874 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -341,6 +341,7 @@ MAN= aac.4 \ netlink.4 \ netmap.4 \ ${_nfe.4} \ + nfslockd.4 \ ${_nfsmb.4} \ ng_async.4 \ ng_bpf.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 7e0652d26533..0ac7ddfeea5c 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