summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-02-22 21:45:20 +0000
committermarius <marius@FreeBSD.org>2010-02-22 21:45:20 +0000
commitaad9e6e97a3813e6052581e512f1a620cf2504c7 (patch)
tree7d7b8dd6bc94d0f84b7ae97972e686783bbba8e4 /sys/modules
parent4b3ea179f8855fad4a2df534ae1acbdacbce6166 (diff)
downloadFreeBSD-src-aad9e6e97a3813e6052581e512f1a620cf2504c7.zip
FreeBSD-src-aad9e6e97a3813e6052581e512f1a620cf2504c7.tar.gz
- Factor out the code shared between NFS client and server into its own
module so it's not present twice. - Move nfs_realign() from the NFS client to the shared NFS code and remove the NFS server version in order to reduce code duplication. The shared version now uses a second parameter how, which is passed on to m_get(9) and m_getcl(9) as the server used M_WAIT while the client requires M_DONTWAIT, and replaces the the previously unused parameter hsiz. - Change nfs_realign() to use nfsm_aligned() so as with other NFS code the alignment check isn't actually performed on platforms without strict alignment requirements for performance reasons because as the comment suggests unaligned data only occasionally occurs with TCP. - Change fha_extract_info() to use nfs_realign() with M_DONTWAIT rather than M_WAIT because it's called with the RPC sp_lock held.
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/nfs_common/Makefile8
-rw-r--r--sys/modules/nfsclient/Makefile4
-rw-r--r--sys/modules/nfsserver/Makefile4
4 files changed, 13 insertions, 4 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index e76d63a..07e4bfb 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -193,6 +193,7 @@ SUBDIR= ${_3dfx} \
${_ndis} \
${_netgraph} \
${_nfe} \
+ nfs_common \
nfscl \
nfsclient \
nfscommon \
diff --git a/sys/modules/nfs_common/Makefile b/sys/modules/nfs_common/Makefile
new file mode 100644
index 0000000..8f51f18
--- /dev/null
+++ b/sys/modules/nfs_common/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../nfs
+
+KMOD= nfs_common
+SRCS= nfs_common.c opt_nfs.h vnode_if.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/nfsclient/Makefile b/sys/modules/nfsclient/Makefile
index c53e3d5..5cd3556 100644
--- a/sys/modules/nfsclient/Makefile
+++ b/sys/modules/nfsclient/Makefile
@@ -1,11 +1,11 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../nfs ${.CURDIR}/../../rpc
+.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../rpc
KMOD= nfsclient
SRCS= vnode_if.h \
nfs_bio.c nfs_lock.c nfs_node.c nfs_subs.c nfs_nfsiod.c \
- nfs_vfsops.c nfs_vnops.c nfs_common.c nfs_krpc.c \
+ nfs_vfsops.c nfs_vnops.c nfs_krpc.c \
opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h
SRCS+= opt_inet6.h opt_kdtrace.h opt_kgssapi.h
diff --git a/sys/modules/nfsserver/Makefile b/sys/modules/nfsserver/Makefile
index 692179b..58ab2bc 100644
--- a/sys/modules/nfsserver/Makefile
+++ b/sys/modules/nfsserver/Makefile
@@ -1,9 +1,9 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../nfsserver ${.CURDIR}/../../nfs
+.PATH: ${.CURDIR}/../../nfsserver
KMOD= nfsserver
SRCS= vnode_if.h \
- nfs_fha.c nfs_serv.c nfs_srvkrpc.c nfs_srvsubs.c nfs_common.c \
+ nfs_fha.c nfs_serv.c nfs_srvkrpc.c nfs_srvsubs.c \
opt_mac.h \
opt_kgssapi.h \
opt_nfs.h
OpenPOWER on IntegriCloud