kernel - Add trigger_syncer(), VFS_MODIFYING()
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 5 Dec 2018 05:49:35 +0000 (21:49 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 17 Dec 2018 21:52:58 +0000 (13:52 -0800)
commit0390d1d375dcb2b950b5a2231855da4d2c595b50
tree29c1d30378412a19aeba1dcd16fb1b17afbc41e4
parentf92dfd19b2f035dc611057a73f41e45ece6b50d6
kernel - Add trigger_syncer(), VFS_MODIFYING()

* Add trigger_syncer().  This function asynchronously triggers the
  syncer vnode in the syncer thread for the mount.  It is a NOP if
  there is no syncer thread or syncer vnode.

  Will be used by HAMMER2 to pipeline syncs when heavy filesystem
  activity over-extends internal memory structures.

* Add VFS_MODIFYING().  This is a hook into the filesystem that
  modifying filesystem ops in the kernel will call prior to locking
  any vnodes.  It allows the filesystem to moderate the over-allocation
  of internal structures.  Waiting until after the VOP is called is too
  late, so we need kernel support for this.  Numerous attempts to hack
  moderation code into the H2 VOPs have all failed spectacularly.

  In H2, over-allocation can occur because H2 must retain disconnected
  inodes related to file creation and deletion until the next sync cycle.
sys/kern/vfs_default.c
sys/kern/vfs_init.c
sys/kern/vfs_sync.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/sys/mount.h
sys/sys/vnode.h