summaryrefslogtreecommitdiffstats
path: root/contrib/diff/lib
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-11-30 22:59:20 +0000
committerpjd <pjd@FreeBSD.org>2012-11-30 22:59:20 +0000
commitdc3cd3e3a48e1501c08be6ab05483e6941eccb9f (patch)
tree00fabb7b10a8789628c1e13f909eaab4224dec43 /contrib/diff/lib
parent552da73086100a3e6f4af630f5d30067a2462d84 (diff)
downloadFreeBSD-src-dc3cd3e3a48e1501c08be6ab05483e6941eccb9f.zip
FreeBSD-src-dc3cd3e3a48e1501c08be6ab05483e6941eccb9f.tar.gz
IFp4 @208382:
Currently on each record write we call VFS_STATFS() to get available space on the file system as well as VOP_GETATTR() to get trail file size. We can assume that trail file is only updated by the audit worker, so instead of asking for file size on every write, get file size on trail switch only (it should be zero, but it's not expensive) and use global variable audit_size protected by the audit worker lock to keep track of trail file's size. This eliminates VOP_GETATTR() call for every write. VFS_STATFS() is satisfied from in-memory data (mount->mnt_stat), so shouldn't be expensive. Sponsored by: FreeBSD Foundation (auditdistd) MFC after: 2 weeks
Diffstat (limited to 'contrib/diff/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud