git: hammer2 - Fix misc bugs

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Oct 26 22:15:16 PDT 2013


commit c057466c48d9aa2ac99dac17befc3aa871a548bc
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Oct 26 22:09:28 2013 -0700

    hammer2 - Fix misc bugs
    
    * Move the live_zero optimization from hammer2_chain to
      hammer2_chain_core.  It is only applicable to the core
      and delete-duplicate operations can mess up the cache.
    
    * Move the HAMMER2_CHAIN_COUNTEDBREFS flag to HAMMER2_CORE_COUNTEDBREFS.
      It is only applicable to the core and delete-duplication operations
      can really mess up calculations of live_count otherwise.
    
    * Don't bump live_count if inserting a deleted chain.
    
    * The vp in the hammer2_sync_scan2() is not locked on purpose.  Use the
      synclist token interlock to safely ref the hammer2_inode before
      potentially blocking, otherwise it can get ripped out from under us.

Summary of changes:
 sys/vfs/hammer2/hammer2.h        |  5 +++--
 sys/vfs/hammer2/hammer2_chain.c  | 43 ++++++++++++++++++++++------------------
 sys/vfs/hammer2/hammer2_flush.c  |  2 +-
 sys/vfs/hammer2/hammer2_vfsops.c | 16 +++++++++++++--
 4 files changed, 42 insertions(+), 24 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list