diff options
author | jeff <jeff@FreeBSD.org> | 2005-06-13 00:46:03 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-06-13 00:46:03 +0000 |
commit | bf15cf716731ee53e91668a4e69158e474b455e5 (patch) | |
tree | 911fd46fdb937d246c361f644fdfd0ba7b256b61 /sys/kern/vfs_cache.c | |
parent | c92b8a6f784f3df721e2e2d5ecdd14495fae84e2 (diff) | |
download | FreeBSD-src-bf15cf716731ee53e91668a4e69158e474b455e5.zip FreeBSD-src-bf15cf716731ee53e91668a4e69158e474b455e5.tar.gz |
- Add KTR_VFS messages for various name cache related events.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r-- | sys/kern/vfs_cache.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 8bcf9ce..0023487 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -271,6 +271,7 @@ cache_zap(ncp) struct vnode *vp; mtx_assert(&cache_lock, MA_OWNED); + CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp); vp = NULL; LIST_REMOVE(ncp, nc_hash); LIST_REMOVE(ncp, nc_src); @@ -357,6 +358,8 @@ retry: if (cnp->cn_nameptr[0] == '.') { if (cnp->cn_namelen == 1) { *vpp = dvp; + CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", + dvp, cnp->cn_nameptr); dothits++; goto success; } @@ -368,6 +371,8 @@ retry: return (0); } *vpp = dvp->v_dd; + CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", + dvp, cnp->cn_nameptr, *vpp); goto success; } } @@ -407,6 +412,8 @@ retry: numposhits++; nchstats.ncs_goodhits++; *vpp = ncp->nc_vp; + CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", + dvp, cnp->cn_nameptr, *vpp, ncp); goto success; } @@ -474,6 +481,7 @@ cache_enter(dvp, vp, cnp) int zap; int len; + CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr); VNASSERT(vp == NULL || (vp->v_iflag & VI_DOOMED) == 0, vp, ("cahe_enter: Adding a doomed vnode")); @@ -571,6 +579,7 @@ cache_purge(vp) { struct namecache *ncp; + CTR1(KTR_VFS, "cache_purge(%p)", vp); CACHE_LOCK(); while (!LIST_EMPTY(&vp->v_cache_src)) { struct vnode *cvp; |