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>
Wed, 5 Dec 2018 18:28:40 +0000 (10:28 -0800)
commit1c222faf36ea48e314d77b9f242ed1258f7717d5
treed749a3f01cf7ea99a1ee905986bc294a026b9a55
parentd0755e6de31ac9c91167b77bd4334b3c4d060fb6
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