summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_common.h
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-02-09 23:45:14 +0000
committermarius <marius@FreeBSD.org>2010-02-09 23:45:14 +0000
commitefffc45c735166ffa1717576e4807cba15304cad (patch)
tree7818cc46c36d665fc28d90982bdd75b487296427 /sys/nfs/nfs_common.h
parent8c1dfdc492d1c6bd09a599013e66bb05a06a1d5c (diff)
downloadFreeBSD-src-efffc45c735166ffa1717576e4807cba15304cad.zip
FreeBSD-src-efffc45c735166ffa1717576e4807cba15304cad.tar.gz
- 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. Reviewed by: jhb, rmacklem MFC after: 1 week
Diffstat (limited to 'sys/nfs/nfs_common.h')
-rw-r--r--sys/nfs/nfs_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/nfs/nfs_common.h b/sys/nfs/nfs_common.h
index 9ad1c11..1c0b315 100644
--- a/sys/nfs/nfs_common.h
+++ b/sys/nfs/nfs_common.h
@@ -48,6 +48,7 @@ extern nfstype nfsv3_type[];
int nfs_adv(struct mbuf **, caddr_t *, int, int);
u_quad_t nfs_curusec(void);
void *nfsm_disct(struct mbuf **, caddr_t *, int, int, int);
+int nfs_realign(struct mbuf **, int);
/* ****************************** */
/* Build request/reply phase macros */
OpenPOWER on IntegriCloud