git: DragonFly_RELEASE_5_4 kernel - Add trigger_syncer(), VFS_MODIFYING()

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Dec 17 13:55:54 PST 2018


commit 0390d1d375dcb2b950b5a2231855da4d2c595b50
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Dec 4 21:49:35 2018 -0800

    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.

Summary of changes:
 sys/kern/vfs_default.c  |  6 ++++++
 sys/kern/vfs_init.c     |  4 ++++
 sys/kern/vfs_sync.c     | 44 ++++++++++++++++++++++++++++++++++++++++----
 sys/kern/vfs_syscalls.c |  1 +
 sys/kern/vfs_vnops.c    | 12 ++++++++++--
 sys/sys/mount.h         |  7 ++++++-
 sys/sys/vnode.h         |  1 +
 7 files changed, 68 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0390d1d375dcb2b950b5a2231855da4d2c595b50


-- 
DragonFly BSD source repository



More information about the Commits mailing list