summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-03-27 11:54:20 +0000
committerdfr <dfr@FreeBSD.org>2008-03-27 11:54:20 +0000
commitdc98ee4196c8969bd3d587924ee9e570228ec62f (patch)
tree567b9aa2e60465e9958f917ce391a9eb7692527f /sys
parent34e730ca273d9bd38d9081bc80c78688c6abdd4c (diff)
downloadFreeBSD-src-dc98ee4196c8969bd3d587924ee9e570228ec62f.zip
FreeBSD-src-dc98ee4196c8969bd3d587924ee9e570228ec62f.tar.gz
Add kernel module support for nfslockd and krpc. Use the module system
to detect (or load) kernel NLM support in rpc.lockd. Remove the '-k' option to rpc.lockd and make kernel NLM the default. A user can still force the use of the old user NLM by building a kernel without NFSLOCKD and/or removing the nfslockd.ko module.
Diffstat (limited to 'sys')
-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
20 files changed, 60 insertions, 0 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
OpenPOWER on IntegriCloud