diff options
author | mckusick <mckusick@FreeBSD.org> | 1999-12-01 02:09:30 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 1999-12-01 02:09:30 +0000 |
commit | a7a8ed1423843607656950db4061ebb31fd1e7d0 (patch) | |
tree | b0c34665672f470d0c72f6ed5f9d861120597e4a /sys/kern | |
parent | 4a057a051637196347444904a661495efcdbb941 (diff) | |
download | FreeBSD-src-a7a8ed1423843607656950db4061ebb31fd1e7d0.zip FreeBSD-src-a7a8ed1423843607656950db4061ebb31fd1e7d0.tar.gz |
Collect read and write counts for filesystems. This new code
drops the counting in bwrite and puts it all in spec_strategy.
I did some tests and verified that the counts collected for writes
in spec_strategy is identical to the counts that we previously
collected in bwrite. We now also get read counts (async reads
come from requests for read-ahead blocks). Note that you need
to compile a new version of mount to get the read counts printed
out. The old mount binary is completely compatible, the only
reason to install a new mount is to get the read counts printed.
Submitted by: Craig A Soules <soules+@andrew.cmu.edu>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index c3dc70e..dd135cf 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -589,8 +589,6 @@ int bwrite(struct buf * bp) { int oldflags, s; - struct vnode *vp; - struct mount *mp; if (bp->b_flags & B_INVAL) { brelse(bp); @@ -618,24 +616,6 @@ bwrite(struct buf * bp) BUF_KERNPROC(bp); VOP_STRATEGY(bp->b_vp, bp); - /* - * Collect statistics on synchronous and asynchronous writes. - * Writes to block devices are charged to their associated - * filesystem (if any). - */ - if ((vp = bp->b_vp) != NULL) { - if (vn_isdisk(vp)) - mp = vp->v_specmountpoint; - else - mp = vp->v_mount; - if (mp != NULL) { - if ((oldflags & B_ASYNC) == 0) - mp->mnt_stat.f_syncwrites++; - else - mp->mnt_stat.f_asyncwrites++; - } - } - if ((oldflags & B_ASYNC) == 0) { int rtval = biowait(bp); brelse(bp); |