hammer2 - Track leaf counts for topological collapse
commit4e0d25fd335ded4e69323a5355504798a6723399
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Sep 2017 22:59:25 +0000 (9 15:59 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Sep 2017 22:59:25 +0000 (9 15:59 -0700)
treefb8d5a2e36805ed3e2a9c8e170e2b0e1067919e5
parent6e4c95df86b26f7ac4d8fa696c7b516e7dcff510
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.
sbin/hammer2/cmd_debug.c
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_disk.h