version 1.35, 2007/02/05 11:55:03 |
version 1.36, 2007/02/05 11:55:45 |
Line 81 TAILQ_HEAD(nfsrvlru, nfsrvcache) nfsrvlr |
|
Line 81 TAILQ_HEAD(nfsrvlru, nfsrvcache) nfsrvlr |
|
struct simplelock nfsrv_reqcache_lock = SIMPLELOCK_INITIALIZER; |
struct simplelock nfsrv_reqcache_lock = SIMPLELOCK_INITIALIZER; |
u_long nfsrvhash; |
u_long nfsrvhash; |
|
|
|
#if defined(MBUFTRACE) |
|
static struct mowner nfsd_cache_mowner = MOWNER_INIT("nfsd", "cache"); |
|
#endif /* defined(MBUFTRACE) */ |
|
|
#define NETFAMILY(rp) \ |
#define NETFAMILY(rp) \ |
(((rp)->rc_flag & RC_INETADDR) ? AF_INET : AF_ISO) |
(((rp)->rc_flag & RC_INETADDR) ? AF_INET : AF_ISO) |
|
|
Line 163 nfsrv_initcache() |
|
Line 167 nfsrv_initcache() |
|
TAILQ_INIT(&nfsrvlruhead); |
TAILQ_INIT(&nfsrvlruhead); |
pool_init(&nfs_reqcache_pool, sizeof(struct nfsrvcache), 0, 0, 0, |
pool_init(&nfs_reqcache_pool, sizeof(struct nfsrvcache), 0, 0, 0, |
"nfsreqcachepl", &pool_allocator_nointr); |
"nfsreqcachepl", &pool_allocator_nointr); |
|
MOWNER_ATTACH(&nfsd_cache_mowner); |
} |
} |
|
|
/* |
/* |
|
|
default: |
default: |
rp->rc_flag |= RC_NAM; |
rp->rc_flag |= RC_NAM; |
rp->rc_nam = m_copym(nd->nd_nam, 0, M_COPYALL, M_WAIT); |
rp->rc_nam = m_copym(nd->nd_nam, 0, M_COPYALL, M_WAIT); |
|
m_claimm(rp->rc_nam, &nfsd_cache_mowner); |
break; |
break; |
}; |
}; |
rp->rc_proc = nd->nd_procnum; |
rp->rc_proc = nd->nd_procnum; |
Line 359 nfsrv_updatecache(nd, repvalid, repmbuf) |
|
Line 365 nfsrv_updatecache(nd, repvalid, repmbuf) |
|
} else { |
} else { |
rp->rc_reply = m_copym(repmbuf, |
rp->rc_reply = m_copym(repmbuf, |
0, M_COPYALL, M_WAIT); |
0, M_COPYALL, M_WAIT); |
|
m_claimm(rp->rc_reply, &nfsd_cache_mowner); |
rp->rc_flag |= RC_REPMBUF; |
rp->rc_flag |= RC_REPMBUF; |
} |
} |
} |
} |