diff options
author | jeff <jeff@FreeBSD.org> | 2007-03-17 18:18:08 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-03-17 18:18:08 +0000 |
commit | d43d58ff4578f356c44c4ad57ff2d4c6b2b99a50 (patch) | |
tree | 3cce5e99818314cbc53c7fe494e3fdbfa9017a1e /sys/nfsserver/nfs_srvsock.c | |
parent | 82143f95ad1b41e027bececf613c3e94f1556ac6 (diff) | |
download | FreeBSD-src-d43d58ff4578f356c44c4ad57ff2d4c6b2b99a50.zip FreeBSD-src-d43d58ff4578f356c44c4ad57ff2d4c6b2b99a50.tar.gz |
- Turn all explicit giant acquires into conditional VFS_LOCK_GIANTs.
Only ops which used namei still remained.
- Implement a scheme for reducing the overhead of tracking which vops
require giant by constantly reducing the number of recursive giant
acquires to one, leaving us with only one vfslocked variable.
- Remove all NFSD lock acquisition and release from the individual nfs
ops. Careful examination has shown that they are not required. This
greatly simplifies the code.
Sponsored by: Isilon Systems, Inc.
Discussed with: rwatson
Tested by: kkenn
Approved by: re
Diffstat (limited to 'sys/nfsserver/nfs_srvsock.c')
-rw-r--r-- | sys/nfsserver/nfs_srvsock.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index eba9cfb..971368f 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -145,13 +145,9 @@ nfs_rephead(int siz, struct nfsrv_descript *nd, int err, caddr_t bpos; struct mbuf *mb; - /* XXXRW: not 100% clear the lock is needed here. */ - NFSD_LOCK_ASSERT(); - nd->nd_repstat = err; if (err && (nd->nd_flag & ND_NFSV3) == 0) /* XXX recheck */ siz = 0; - NFSD_UNLOCK(); MGETHDR(mreq, M_TRYWAIT, MT_DATA); mb = mreq; /* @@ -164,7 +160,6 @@ nfs_rephead(int siz, struct nfsrv_descript *nd, int err, MCLGET(mreq, M_TRYWAIT); } else mreq->m_data += min(max_hdr, M_TRAILINGSPACE(mreq)); - NFSD_LOCK(); tl = mtod(mreq, u_int32_t *); bpos = ((caddr_t)tl) + mreq->m_len; *tl++ = txdr_unsigned(nd->nd_retxid); @@ -246,18 +241,13 @@ nfs_realign(struct mbuf **pm, int hsiz) /* XXX COMMON */ struct mbuf *n = NULL; int off = 0; - /* XXXRW: may not need lock? */ - NFSD_LOCK_ASSERT(); - ++nfs_realign_test; while ((m = *pm) != NULL) { if ((m->m_len & 0x3) || (mtod(m, intptr_t) & 0x3)) { - NFSD_UNLOCK(); MGET(n, M_TRYWAIT, MT_DATA); if (m->m_len >= MINCLSIZE) { MCLGET(n, M_TRYWAIT); } - NFSD_LOCK(); n->m_len = 0; break; } |