summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2012-03-28 20:49:11 +0000
committermckusick <mckusick@FreeBSD.org>2012-03-28 20:49:11 +0000
commit9a7982e5a0267c0421856f3a43a1ae75880058f3 (patch)
treee4296e1e7484307c80036dcfa1043b1869febf17 /sys/vm
parent4d38be64d75540ce84d18b307ffc130ac5d5f2f9 (diff)
downloadFreeBSD-src-9a7982e5a0267c0421856f3a43a1ae75880058f3.zip
FreeBSD-src-9a7982e5a0267c0421856f3a43a1ae75880058f3.tar.gz
Keep track of the mount point associated with a special device
to enable the collection of counts of synchronous and asynchronous reads and writes for its associated filesystem. The counts are displayed using `mount -v'. Ensure that buffers used for paging indicate the vnode from which they are operating so that counts of paging I/O operations from the filesystem are collected. This checkin only adds the setting of the mount point for the UFS/FFS filesystem, but it would be trivial to add the setting and clearing of the mount point at filesystem mount/unmount time for other filesystems too. Reviewed by: kib
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vnode_pager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index c5b6c17..c8c57e1 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -543,6 +543,7 @@ vnode_pager_input_smlfs(object, m)
bp->b_data = (caddr_t)sf_buf_kva(sf) + i * bsize;
bp->b_blkno = fileaddr;
pbgetbo(bo, bp);
+ bp->b_vp = vp;
bp->b_bcount = bsize;
bp->b_bufsize = bsize;
bp->b_runningbufspace = bp->b_bufsize;
@@ -560,6 +561,7 @@ vnode_pager_input_smlfs(object, m)
/*
* free the buffer header back to the swap buffer pool
*/
+ bp->b_vp = NULL;
pbrelbo(bp);
relpbuf(bp, &vnode_pbuf_freecnt);
if (error)
@@ -918,6 +920,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
bp->b_wcred = crhold(curthread->td_ucred);
bp->b_blkno = firstaddr;
pbgetbo(bo, bp);
+ bp->b_vp = vp;
bp->b_bcount = size;
bp->b_bufsize = size;
bp->b_runningbufspace = bp->b_bufsize;
@@ -944,6 +947,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
/*
* free the buffer header back to the swap buffer pool
*/
+ bp->b_vp = NULL;
pbrelbo(bp);
relpbuf(bp, &vnode_pbuf_freecnt);
OpenPOWER on IntegriCloud