git: hammer2 - Track leaf counts for topological collapse

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Sep 9 16:08:08 PDT 2017


commit 4e0d25fd335ded4e69323a5355504798a6723399
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Sep 9 15:59:25 2017 -0700

    hammer2 - Track leaf counts for topological collapse
    
    * Track leaf counts through indirect blocks.  This is a prereq to
      being able to efficiently collapse indirect nodes that have become
      too empty to be useful.
    
    * Leaf count is capped at 65535.  Attempting to decrement the count will
      flag the chain to recount (in a later commit).
    
    * Because this count will be used to determine when a collapse is possible,
      we do not track leaf counts through inodes.  That is, an inode counts as
      a leaf.

Summary of changes:
 sbin/hammer2/cmd_debug.c        |  7 ++++--
 sys/vfs/hammer2/hammer2.h       |  1 +
 sys/vfs/hammer2/hammer2_chain.c | 48 +++++++++++++++++++++++++++++++++++++----
 sys/vfs/hammer2/hammer2_disk.h  | 14 ++++++++++--
 4 files changed, 62 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4e0d25fd335ded4e69323a5355504798a6723399


-- 
DragonFly BSD source repository



More information about the Commits mailing list