Searched hist:243722 (Results 1 - 1 of 1) sorted by relevance

/freebsd-10.0-release/sys/security/audit/
H A Daudit_worker.cdiff 243722 Fri Nov 30 21:04:30 MST 2012 pjd 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

Completed in 106 milliseconds