summaryrefslogtreecommitdiffstats
path: root/sys/nlm
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/nlm
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/nlm')
-rw-r--r--sys/nlm/nlm_prot_impl.c20
1 files changed, 20 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud