summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/conf/GENERIC1
-rw-r--r--sys/arm/conf/AVILA1
-rw-r--r--sys/arm/conf/BWCT1
-rw-r--r--sys/arm/conf/CRB1
-rw-r--r--sys/arm/conf/EP802191
-rw-r--r--sys/arm/conf/HL2001
-rw-r--r--sys/arm/conf/IQ312441
-rw-r--r--sys/arm/conf/KB920X1
-rw-r--r--sys/arm/conf/SIMICS1
-rw-r--r--sys/arm/conf/SKYEYE1
-rw-r--r--sys/i386/conf/GENERIC1
-rw-r--r--sys/i386/conf/XBOX1
-rw-r--r--sys/ia64/conf/GENERIC1
-rw-r--r--sys/modules/Makefile2
-rw-r--r--sys/nlm/nlm_prot_impl.c20
-rw-r--r--sys/pc98/conf/GENERIC1
-rw-r--r--sys/powerpc/conf/GENERIC1
-rw-r--r--sys/rpc/rpc_generic.c21
-rw-r--r--sys/sparc64/conf/GENERIC1
-rw-r--r--sys/sun4v/conf/GENERIC1
-rw-r--r--usr.sbin/rpc.lockd/lockd.c19
-rw-r--r--usr.sbin/rpc.lockd/rpc.lockd.86
22 files changed, 74 insertions, 11 deletions
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index 665e5d7..f8db8d8 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -39,6 +39,7 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options NTFS # NT File System
options MSDOSFS # MSDOS Filesystem
diff --git a/sys/arm/conf/AVILA b/sys/arm/conf/AVILA
index b976ccd..53b2681 100644
--- a/sys/arm/conf/AVILA
+++ b/sys/arm/conf/AVILA
@@ -57,6 +57,7 @@ options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/arm/conf/BWCT b/sys/arm/conf/BWCT
index c9e313c..7d1a4be 100644
--- a/sys/arm/conf/BWCT
+++ b/sys/arm/conf/BWCT
@@ -48,6 +48,7 @@ options SOFTUPDATES #Enable FFS soft updates support
#options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
options NFSCLIENT #Network Filesystem Client
#options NFSSERVER #Network Filesystem Server
+#options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
options BOOTP_NFSROOT
options BOOTP
diff --git a/sys/arm/conf/CRB b/sys/arm/conf/CRB
index 339bc6c..d722c4a 100644
--- a/sys/arm/conf/CRB
+++ b/sys/arm/conf/CRB
@@ -45,6 +45,7 @@ options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/arm/conf/EP80219 b/sys/arm/conf/EP80219
index ca656e2..5814cf6 100644
--- a/sys/arm/conf/EP80219
+++ b/sys/arm/conf/EP80219
@@ -44,6 +44,7 @@ options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/arm/conf/HL200 b/sys/arm/conf/HL200
index ef07ee6..fc0529c 100644
--- a/sys/arm/conf/HL200
+++ b/sys/arm/conf/HL200
@@ -51,6 +51,7 @@ options FFS #Berkeley Fast Filesystem
#options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
options NFSCLIENT #Network Filesystem Client
#options NFSSERVER #Network Filesystem Server
+#options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
options BOOTP_NFSROOT
options BOOTP
diff --git a/sys/arm/conf/IQ31244 b/sys/arm/conf/IQ31244
index 0dd6e7e..7590a87 100644
--- a/sys/arm/conf/IQ31244
+++ b/sys/arm/conf/IQ31244
@@ -45,6 +45,7 @@ options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/arm/conf/KB920X b/sys/arm/conf/KB920X
index d9aae57..60e3da1 100644
--- a/sys/arm/conf/KB920X
+++ b/sys/arm/conf/KB920X
@@ -42,6 +42,7 @@ options FFS #Berkeley Fast Filesystem
options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
options NFSCLIENT #Network Filesystem Client
#options NFSSERVER #Network Filesystem Server
+#options NFSLOCKD #Network Lock Manager
#options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options BOOTP_NFSROOT
#options BOOTP
diff --git a/sys/arm/conf/SIMICS b/sys/arm/conf/SIMICS
index dbf4c49..5bcf09a 100644
--- a/sys/arm/conf/SIMICS
+++ b/sys/arm/conf/SIMICS
@@ -43,6 +43,7 @@ options MD_ROOT #MD is a potential root device
options ROOTDEVNAME=\"ufs:md0\"
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/arm/conf/SKYEYE b/sys/arm/conf/SKYEYE
index 0e2465d..1983b10 100644
--- a/sys/arm/conf/SKYEYE
+++ b/sys/arm/conf/SKYEYE
@@ -46,6 +46,7 @@ options MD_ROOT_SIZE=4096
options ROOTDEVNAME=\"ufs:md0\"
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index 15bc3b4..b5a45a7 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -41,6 +41,7 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
options CD9660 # ISO 9660 Filesystem
diff --git a/sys/i386/conf/XBOX b/sys/i386/conf/XBOX
index 9902620..680c7c4 100644
--- a/sys/i386/conf/XBOX
+++ b/sys/i386/conf/XBOX
@@ -29,6 +29,7 @@ options SOFTUPDATES # Enable FFS soft updates support
#options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
#options NFSSERVER # Network Filesystem Server
+#options NFSLOCKD # Network Lock Manager
#options NFS_ROOT # NFS usable as /, requires NFSCLIENT
#options MSDOSFS # MSDOS Filesystem
options CD9660 # ISO 9660 Filesystem
diff --git a/sys/ia64/conf/GENERIC b/sys/ia64/conf/GENERIC
index 9d1c47c..8c4a0af 100644
--- a/sys/ia64/conf/GENERIC
+++ b/sys/ia64/conf/GENERIC
@@ -44,6 +44,7 @@ options MD_ROOT # MD usable as root device
options MSDOSFS # MSDOS Filesystem
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as root device
options PROCFS # Process filesystem (/proc)
options PSEUDOFS # Pseudo-filesystem framework
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index d350c33..a8178a2 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -141,6 +141,7 @@ SUBDIR= ${_3dfx} \
${_ixgb} \
joy \
kbdmux \
+ krpc \
kue \
le \
lge \
@@ -185,6 +186,7 @@ SUBDIR= ${_3dfx} \
netgraph \
${_nfe} \
nfsclient \
+ nfslockd \
nfsserver \
nge \
nmdm \
diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c
index 106f4b5..528f8a0 100644
--- a/sys/nlm/nlm_prot_impl.c
+++ b/sys/nlm/nlm_prot_impl.c
@@ -1781,3 +1781,23 @@ nlm_user_lockd(void)
return (nlm_lockd);
}
+
+/*
+ * Kernel module glue
+ */
+static int
+nfslockd_modevent(module_t mod, int type, void *data)
+{
+
+ return (0);
+}
+static moduledata_t nfslockd_mod = {
+ "nfslockd",
+ nfslockd_modevent,
+ NULL,
+};
+DECLARE_MODULE(nfslockd, nfslockd_mod, SI_SUB_VFS, SI_ORDER_ANY);
+
+/* So that loader and kldload(2) can find us, wherever we are.. */
+MODULE_DEPEND(nfslockd, krpc, 1, 1, 1);
+MODULE_VERSION(nfslockd, 1);
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index 2add059..b8fdced 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -41,6 +41,7 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
options CD9660 # ISO 9660 Filesystem
diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC
index 50f22ab..00d56ef 100644
--- a/sys/powerpc/conf/GENERIC
+++ b/sys/powerpc/conf/GENERIC
@@ -42,6 +42,7 @@ options UFS_GJOURNAL #Enable gjournal-based UFS journaling
options MD_ROOT #MD is a potential root device
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as root device
options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c
index c2a898b..8d4c80f 100644
--- a/sys/rpc/rpc_generic.c
+++ b/sys/rpc/rpc_generic.c
@@ -44,7 +44,9 @@ __FBSDID("$FreeBSD$");
#include "opt_inet6.h"
#include <sys/param.h>
+#include <sys/kernel.h>
#include <sys/malloc.h>
+#include <sys/module.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/sbuf.h>
@@ -714,3 +716,22 @@ __rpc_sockisbound(struct socket *so)
return bound;
}
+
+/*
+ * Kernel module glue
+ */
+static int
+krpc_modevent(module_t mod, int type, void *data)
+{
+
+ return (0);
+}
+static moduledata_t krpc_mod = {
+ "krpc",
+ krpc_modevent,
+ NULL,
+};
+DECLARE_MODULE(krpc, krpc_mod, SI_SUB_VFS, SI_ORDER_ANY);
+
+/* So that loader and kldload(2) can find us, wherever we are.. */
+MODULE_VERSION(krpc, 1);
diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC
index c9e4d27..c5715af 100644
--- a/sys/sparc64/conf/GENERIC
+++ b/sys/sparc64/conf/GENERIC
@@ -44,6 +44,7 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
#options MSDOSFS # MSDOS Filesystem
options CD9660 # ISO 9660 Filesystem
diff --git a/sys/sun4v/conf/GENERIC b/sys/sun4v/conf/GENERIC
index bfc2aaa..6408254 100644
--- a/sys/sun4v/conf/GENERIC
+++ b/sys/sun4v/conf/GENERIC
@@ -42,6 +42,7 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
#options MSDOSFS # MSDOS Filesystem
options NULLFS
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index 3b1572e..1e55540 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -46,7 +46,9 @@ __RCSID("$NetBSD: lockd.c,v 1.7 2000/08/12 18:08:44 thorpej Exp $");
* The actual program logic is in the file lock_proc.c
*/
-#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/linker.h>
+#include <sys/module.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -116,7 +118,7 @@ main(int argc, char **argv)
int maxrec = RPC_MAXDATASIZE;
in_port_t svcport = 0;
- while ((ch = getopt(argc, argv, "d:g:h:kp:")) != (-1)) {
+ while ((ch = getopt(argc, argv, "d:g:h:p:")) != (-1)) {
switch (ch) {
case 'd':
debug_level = atoi(optarg);
@@ -153,9 +155,6 @@ main(int argc, char **argv)
out_of_mem();
}
break;
- case 'k':
- kernel_lockd = TRUE;
- break;
case 'p':
endptr = NULL;
svcport = (in_port_t)strtoul(optarg, &endptr, 10);
@@ -175,6 +174,16 @@ main(int argc, char **argv)
exit(1);
}
+ kernel_lockd = 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");
+ }
+ kernel_lockd = TRUE;
+ } else {
+ kernel_lockd = TRUE;
+ }
+
(void)rpcb_unset(NLM_PROG, NLM_SM, NULL);
(void)rpcb_unset(NLM_PROG, NLM_VERS, NULL);
(void)rpcb_unset(NLM_PROG, NLM_VERSX, NULL);
diff --git a/usr.sbin/rpc.lockd/rpc.lockd.8 b/usr.sbin/rpc.lockd/rpc.lockd.8
index 9cd429b..4fabe5d 100644
--- a/usr.sbin/rpc.lockd/rpc.lockd.8
+++ b/usr.sbin/rpc.lockd/rpc.lockd.8
@@ -41,7 +41,6 @@
.Nd NFS file locking daemon
.Sh SYNOPSIS
.Nm
-.Op Fl k
.Op Fl d Ar debug_level
.Op Fl g Ar grace period
.Op Fl h Ar bindip
@@ -59,11 +58,6 @@ with
Options and operands available for
.Nm :
.Bl -tag -width indent
-.It Fl k
-The
-.Fl k
-option specifies the use of the kernel-resident NFS lock manager, if
-possible.
.It Fl d
The
.Fl d
OpenPOWER on IntegriCloud