git: hammer2 - Add indirect node collapse code

Matthew Dillon dillon at
Sun Sep 10 10:08:11 PDT 2017

commit 850d3f60f0a03e7a3f08357489acac749d6224ca
Author: Matthew Dillon <dillon at>
Date:   Sun Sep 10 10:03:09 2017 -0700

    hammer2 - Add indirect node collapse code
    * Move the contents of an indirect node into its parent when either
      becomes empty enough to accomodate the move.  This is done during
      the flush and incurs no extra overhead or I/O.
    * This is not a rebalancing algorithm but it does do a pretty good
      job reducing degenerate indirect nodes in the topology.
    * Note that I am not using bref->leaf_count yet.  This will be used
      in a later rebalancing algorithm.
    * Fix minor bug in hammer2_chain_create_indirect() where a chain's
      bref was being tested without holding a lock on the chain.
    * Remove misc debugging that we no longer need.

Summary of changes:
 sys/vfs/hammer2/hammer2.h       |   7 +-
 sys/vfs/hammer2/hammer2_chain.c | 159 ++++++++++++++++++++++++++++++++++++++--
 sys/vfs/hammer2/hammer2_flush.c |  69 +++--------------
 3 files changed, 170 insertions(+), 65 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list