1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00
freebsd/sys
Robert Watson 71909edec8 Significant refactoring of the accounting code to improve locking and VFS
happiness, as well as correct other bugs:

- Replace notion of current and saved accounting credential/vnode with a
  single credential/vnode and an acct_suspended flag.  This simplifies the
  accounting logic substantially.

- Replace acct_mtx with acct_sx, a sleepable lock held exclusively during
  reconfiguration and space polling, but shared during log entry
  generation.  This avoids holding a mutex over sleepable VFS operations.

- Hold the sx lock over the duration of the I/O so that the vnode I/O
  cannot occur after vnode close, which could occur previously if
  accounting was disabled as a process exited.

- Write the accounting log entry with Giant conditionally acquired based
  on the file system where the log is stored.  Previously, the accounting
  code relied on the caller acquiring Giant.

- Acquire Giant conditionally in the accounting callout based on the file
  system where the accounting log is stored.  Run the callout MPSAFE.

- Expose acct_suspended via a read-only sysctl so it is possibly to
  programmatically determine whether accounting is suspended or not without
  attempting to parse logs.

- Check both acct_vp and acct_suspended lock-free before entering the
  accounting sx lock in acct().

- When accounting is disabled due to a VBAD vnode (i.e., forceable unmount),
  generate a log message indicating accounting has been disabled.

- Correct a long-standing bug in how free space is calculated and compared
  to the required space: generate and compare signed results, not unsigned
  results, or negative free space will cause accounting to not be suspended
  when required, or worse, incorrectly resumed once negative free space is
  reached.

MFC after:	2 weeks
2005-11-12 10:45:13 +00:00
..
alpha Reimplement the reclamation of PV entries. Specifically, perform 2005-11-09 08:19:21 +00:00
amd64 Add /dev/speaker support to amd64. 2005-11-11 09:57:32 +00:00
arm There's no need to include <machine/asmacros.h> here. 2005-11-08 13:01:29 +00:00
boot Rename GEOM class kernel module g_md.ko to geom_md.ko for consistency 2005-11-11 11:31:23 +00:00
bsm
cam Make the exploring of all luns supported by an HBA more of a 2005-09-16 01:26:17 +00:00
coda Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
compat - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
conf Add /dev/speaker support to amd64. 2005-11-11 09:57:32 +00:00
contrib - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
crypto
ddb - Rename 'traceall' to 'alltrace' so that the 'tr' shortcut for 'trace' 2005-10-24 15:21:36 +00:00
dev Update PCI ids to add the E200, E200i, P400, and P400i storage 2005-11-11 16:45:33 +00:00
doc
fs This is a workaround for a complicated issue involving VFS cookies and devfs. 2005-11-09 22:03:50 +00:00
gdb
geom Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
gnu Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
i4b
i386 Add /dev/speaker support to amd64. 2005-11-11 09:57:32 +00:00
ia64 Reimplement the reclamation of PV entries. Specifically, perform 2005-11-09 08:19:21 +00:00
isa Add support for XBOX to the FreeBSD port. The xbox architecture is 2005-11-09 03:55:40 +00:00
isofs/cd9660 Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
kern Significant refactoring of the accounting code to improve locking and VFS 2005-11-12 10:45:13 +00:00
libkern Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
modules Rename GEOM class kernel module g_md.ko to geom_md.ko for consistency 2005-11-11 11:31:23 +00:00
net - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
net80211 - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netatalk - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netatm - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netgraph - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netinet - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netinet6 Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netipsec Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netipx Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netkey Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netnatm Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netncp Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
netsmb Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
nfs
nfs4client Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
nfsclient fix a crash when an nfsv2 mount fails 2005-11-10 23:25:16 +00:00
nfsserver Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
opencrypto
pc98 MFi386: Remove obsolete options. 2005-11-09 12:26:37 +00:00
pccard Remove the kernel portion of OLDCARD. I'm working on a replacement 2005-09-25 21:29:32 +00:00
pci - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
posix4 Const-qualify ksem_timedwait's parameter abstime as it's only passed in. 2005-10-18 11:46:24 +00:00
powerpc Add definitions for 64-bit PTEs 2005-11-11 12:03:28 +00:00
rpc Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
security Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
sparc64 Uncomment em(4) as it's now working. 2005-11-09 08:49:46 +00:00
sys - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
tools Add convenience macros for bus_space usage that doesn't require specification 2005-09-24 20:11:07 +00:00
ufs Slightly reorganize to reduce duplicated code. 2005-11-07 18:25:23 +00:00
vm Reimplement the reclamation of PV entries. Specifically, perform 2005-11-09 08:19:21 +00:00
Makefile