diff options
author | gjb <gjb@FreeBSD.org> | 2016-04-11 15:24:59 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2016-04-11 15:24:59 +0000 |
commit | e0e3598ce13850597a66fd28d102b36881f7d610 (patch) | |
tree | f5194d1ce3fa45b67cf63080fc519fec83abc57a /sys/ufs/ffs/ffs_inode.c | |
parent | cbc3bd9845ba5fd58e8132f9565cfbc41433938d (diff) | |
parent | 26836fccd261358467b3d92e77ff4695af286de9 (diff) | |
download | FreeBSD-src-e0e3598ce13850597a66fd28d102b36881f7d610.zip FreeBSD-src-e0e3598ce13850597a66fd28d102b36881f7d610.tar.gz |
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/ufs/ffs/ffs_inode.c')
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index c8dac1b..0202820 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/mount.h> #include <sys/proc.h> +#include <sys/racct.h> #include <sys/random.h> #include <sys/resourcevar.h> #include <sys/rwlock.h> @@ -659,6 +660,13 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) vp = ITOV(ip); bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, 0, 0); if ((bp->b_flags & B_CACHE) == 0) { +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(curproc); + racct_add_buf(curproc, bp, 0); + PROC_UNLOCK(curproc); + } +#endif /* RACCT */ curthread->td_ru.ru_inblock++; /* pay for read */ bp->b_iocmd = BIO_READ; bp->b_flags &= ~B_INVAL; |