git: hammer2 - Cluster API cleanup

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Mar 23 18:34:46 PDT 2015


commit fe73aa5d256e4ce829031e601b0986daee9dd6e9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Mar 23 18:29:05 2015 -0700

    hammer2 - Cluster API cleanup
    
    * Simplify hammer2_cluster_copy() to reduce ref count confusion.  It now
      always refs the underlying chains and the cluster.  The follow-up
      hammer2_cluster_lock() op can then be called with HAMMER2_RESOLVE_NOREF
      to avoid double-refs on the cluster and its underlying chains.
    
    * Simplify hammer2_inode_lock_ex() and hammer2_inode_lock_sh().  These
      functions now use hammer2_cluster_lock() instead of rolling their own.
    
    * Focus is now never set until a cluster is locked.  However, continue
      to cache a default focus in the hammer2_inode's embedded cluster.
    
    * Remove some dead code.

Summary of changes:
 sys/vfs/hammer2/hammer2.h         |  6 +--
 sys/vfs/hammer2/hammer2_chain.c   | 37 -----------------
 sys/vfs/hammer2/hammer2_cluster.c | 86 +++++++++++++++++++++------------------
 sys/vfs/hammer2/hammer2_inode.c   | 81 +++++++++++++++++-------------------
 sys/vfs/hammer2/hammer2_ioctl.c   |  2 +-
 5 files changed, 86 insertions(+), 126 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list