git: hammer2 - Reduce flush complexity, fix panics

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Mar 5 18:45:27 PST 2014


commit 052e0aa030a0e4377891f952f2169e0f2880c20a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Mar 5 18:37:57 2014 -0800

    hammer2 - Reduce flush complexity, fix panics
    
    * Set synchronous flush mode by default for now to reduce sources of
      potential crashes so the core can be stabilized.
    
      This means that the only transactions that will run with a higher
      transaction id during a flush are allocations from the freemap made
      by the flush itself.  This is far easier to debug.
    
      Concurrent frontend transactions are disabled during a flush, for now.
    
    * The buffer flush which is run synchronously from the main flush now always
      uses an async + sync vfsync sequence and does not allow any buffers to
      be left over before entering the main flush.
    
    * The buffer flush now also uses the same transaction id as the main flush.
      A new flag, HAMMER2_TRANS_PREFLUSH is used to manage this mechanic and
      to assert on any illegal buffer flushes.
    
    * Fix miscellanious assertions that were incorrect, and split the pass4
      codepath in the flush into pass4 and pass5 to fix another bug.
    
    * Fix an improper semicolon (from swildner)
    
    * Remove more dead code.
    
    * The hammer2_vop_reclaim() code was the only code path that would acquire
      a hammer2_inode lock prior to starting a transaction for a modifying
      operation (for the delete unlinked file on last reference).  Fix this
      code to open the transaction first and obtain the inode lock second,
      which fixes a deadlock.
    
    * Fix an infinite while() loop due to improper arguments in a TAILQ_NEXT()
      call.

Summary of changes:
 sys/vfs/hammer2/hammer2.h         |   2 +-
 sys/vfs/hammer2/hammer2_flush.c   | 240 +++++++++++++++++++++-----------------
 sys/vfs/hammer2/hammer2_freemap.c |   8 +-
 sys/vfs/hammer2/hammer2_vfsops.c  |  47 ++++----
 sys/vfs/hammer2/hammer2_vnops.c   |  32 +++--
 5 files changed, 186 insertions(+), 143 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/052e0aa030a0e4377891f952f2169e0f2880c20a


-- 
DragonFly BSD source repository


More information about the Commits mailing list