git: hammer2 - flush sequencing part 6 - stabilization pass

Matthew Dillon dillon at
Fri May 10 03:05:51 PDT 2013

commit cd189b1e7ab1818608c043e96829a95fb53b2c1b
Author: Matthew Dillon <dillon at>
Date:   Fri May 10 02:54:16 2013 -0700

    hammer2 - flush sequencing part 6 - stabilization pass
    * Fix bug when chains are e.g. delete/duplicated where a flush can occur
      out of order and retire more recent chain structures leaving older
      CHAIN_DELETED structures behind.  This caused the merged chain_find
      and lookup/iteration code to improperly believe a slot was empty when
      in fact the parent's bref array had a valid blockref.
      Fixed by flagging the discrete chain->next_parent linkages with
      CHAIN_IPACTIVE and adding a ref to the chain, which prevents them
      from being retired out of order.  This is currently being done
      unconditionally (and probably has to be done unconditionally).
    * Fix bug related to the clearing of SUBMODIFIED during a flush.  Generally
      speaking a flush pass clears SUBMODIFIED if no children were deferred.
      The bug is that higher-level indirect-block chains closer to the root
      are typically only modified during the flush as the deeper chains are
      flushed recursively and rolled up into the parents on the way back up.
      Because of this, these higher-level chains could represent more than one
      flush synchronization point.  When this situation is detected we now
      set SUBMODIFIED here too.
    * Consolidate ip->chain adjustments into the hammer2_inode_repoint()
      procedure.  Remove hammer2_inode_put().
    * Cleanup some #if 0'd code that I won't be using.

Summary of changes:
 sys/vfs/hammer2/hammer2.h        |   2 +-
 sys/vfs/hammer2/hammer2_chain.c  | 127 ++++++++-----------------
 sys/vfs/hammer2/hammer2_flush.c  |  75 +++++++++------
 sys/vfs/hammer2/hammer2_inode.c  | 196 +++++++++++++++++++++------------------
 sys/vfs/hammer2/hammer2_vfsops.c |   4 -
 sys/vfs/hammer2/hammer2_vnops.c  |   7 +-
 6 files changed, 198 insertions(+), 213 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list