diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2009-01-20 18:03:34 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2009-01-20 18:03:34 +0000 |
commit | 199b082eead7dda7c0f57481e944a270935477e6 (patch) | |
tree | a61b815572628c8611a844732dc103484f610b14 /sys/nfs/nfs_subs.c | |
parent | 0ea2cfe352f9f811345e1465032118052d284515 (diff) |
Start reworking NFS client mbuf handling by creating an interface which
requires well-formed mbuf chains to work. Existing function name is now
a wrapper to this interface. Much, much more work to follow which will
build on this.
Truly change we can believe in.
ok thib@, who would have preferred this in two commits, but I'm impatient :)
testing on multiple arches (i386, arm, amd64, and sparc64 at least) by many,
thanks to all who did so
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r-- | sys/nfs/nfs_subs.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index abe420b74c5..da2c2b9158b 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.90 2009/01/13 19:44:20 grange Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.91 2009/01/20 18:03:33 blambert Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -561,8 +561,7 @@ nfs_get_xid(void) * other authorization methods, such as Kerberos. */ void -nfsm_rpchead(struct nfsreq *req, struct ucred *cr, int auth_type, - struct mbuf *mrest, int mrest_len) +nfsm_rpchead(struct nfsreq *req, struct ucred *cr, int auth_type) { struct mbuf *mb; u_int32_t *tl; @@ -572,10 +571,10 @@ nfsm_rpchead(struct nfsreq *req, struct ucred *cr, int auth_type, /* * RPCAUTH_UNIX fits in an hdr mbuf, in the future other - * authorization methods need to figure out there own sizes + * authorization methods need to figure out their own sizes * and allocate and chain mbuf's accorindgly. */ - MGETHDR(mb, M_WAIT, MT_DATA); + mb = req->r_mreq; /* * We need to start out by finding how big the authorization cred @@ -640,10 +639,8 @@ nfsm_rpchead(struct nfsreq *req, struct ucred *cr, int auth_type, break; } - mb->m_next = mrest; - mb->m_pkthdr.len = authsiz + 10 * NFSX_UNSIGNED + mrest_len; + mb->m_pkthdr.len += authsiz + 10 * NFSX_UNSIGNED; mb->m_pkthdr.rcvif = NULL; - req->r_mreq = mb; } /* |