VFS accounting: add in-memory storage counters
authorFrancois Tigeot <ftigeot@wolfpond.org>
Sat, 13 Aug 2011 09:34:39 +0000 (11:34 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sat, 10 Dec 2011 22:07:49 +0000 (23:07 +0100)
commit95bf5f78c7cc3efd179978b5b65d2dcd1506d018
tree75ce91ad13a065b2e5b119516287e75047b75fe4
parent491a8d951efb74b854611e5ef1a667c085aee5f5
VFS accounting: add in-memory storage counters

* Use a red-black tree of small arrays to store uid and gid accounting
  information.
  User and group ids often come in small groups of consecutive numbers;
  small arrays have a high probability of having more than one element
  used at the same time, reducing pointer chasing in the binary tree.

* Also use a global per mount-point counter

* Only enable data collection for volumes which have been properly
  initialized

* Protect the counters by a per mount-point spinlock
sys/kern/vfs_default.c
sys/kern/vfs_init.c
sys/kern/vfs_quota.c
sys/sys/mount.h
sys/sys/vfs_quota.h