summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-03-08 20:27:20 +0000
committerjhb <jhb@FreeBSD.org>2012-03-08 20:27:20 +0000
commit19feaba08bc6b84c117bd21cc71e139c6d086ed7 (patch)
tree8f19e446f40b0494d383b5102ee060aeb4617503 /sys/vm
parent4fea355eb2254754b2e522d87d81c5562252116a (diff)
downloadFreeBSD-src-19feaba08bc6b84c117bd21cc71e139c6d086ed7.zip
FreeBSD-src-19feaba08bc6b84c117bd21cc71e139c6d086ed7.tar.gz
Add KTR_VFS traces to track modifications to a vnode's writecount.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vnode_pager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 609205a..c5b6c17 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -272,6 +272,8 @@ vnode_pager_dealloc(object)
if (object->un_pager.vnp.writemappings > 0) {
object->un_pager.vnp.writemappings = 0;
vp->v_writecount--;
+ CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d",
+ __func__, vp, vp->v_writecount);
}
vp->v_object = NULL;
vp->v_vflag &= ~VV_TEXT;
@@ -1241,9 +1243,13 @@ vnode_pager_update_writecount(vm_object_t object, vm_offset_t start,
if (old_wm == 0 && object->un_pager.vnp.writemappings != 0) {
ASSERT_VOP_ELOCKED(vp, "v_writecount inc");
vp->v_writecount++;
+ CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d",
+ __func__, vp, vp->v_writecount);
} else if (old_wm != 0 && object->un_pager.vnp.writemappings == 0) {
ASSERT_VOP_ELOCKED(vp, "v_writecount dec");
vp->v_writecount--;
+ CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d",
+ __func__, vp, vp->v_writecount);
}
VM_OBJECT_UNLOCK(object);
}
OpenPOWER on IntegriCloud