git: hammer2 - Refactor flush

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Oct 31 23:08:57 PDT 2013


commit a7720be71b29acdd1e64c3c5a95c9aa0fb204e25
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Oct 30 00:13:34 2013 -0700

    hammer2 - Refactor flush
    
    * Replace HAMMER2_CHAIN_SUBMODIFIED with core->update_tid.  SUBMODIFIED
      applies to chain->core, not to chain. Use a TID to track updates to
      make it easier for a flush to update records without messing up flush
      sequencing of chains being concurrently modified outside the flush's
      TID (that will be handled in the next flush).
    
    * Make sure the DUPLICATED flag is set when duplicating a chain which
      has already been duplicated to another target.  This case is only during
      flushes and can occur when the flush races against concurrent updates
      which are not part of the flush.
    
    * Refactor bioq flushing during a flush.  hammer2_vfs_sync now gives the
      bioq a window to operate using the flush's TID before the flush actually
      starts to flush.
    
    * hammer2_chain_modify() retains the current allocation block if the TID
      does not cross a flush boundary.
    
    * chain->bref.mirror_tid is now used to track flush progress and is compared
      against core->update_tid to determine when a flush is needed.
    
    * Code cleanups.

Summary of changes:
 sys/vfs/hammer2/hammer2.h         |  25 +-
 sys/vfs/hammer2/hammer2_chain.c   | 543 ++++++++++++++++----------------------
 sys/vfs/hammer2/hammer2_flush.c   | 469 +++++++++++++++++++++-----------
 sys/vfs/hammer2/hammer2_freemap.c |   7 +
 sys/vfs/hammer2/hammer2_inode.c   |   6 +-
 sys/vfs/hammer2/hammer2_ioctl.c   |   4 +-
 sys/vfs/hammer2/hammer2_vfsops.c  | 160 +++++++----
 sys/vfs/hammer2/hammer2_vnops.c   |  39 +--
 8 files changed, 696 insertions(+), 557 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a7720be71b29acdd1e64c3c5a95c9aa0fb204e25


-- 
DragonFly BSD source repository



More information about the Commits mailing list