HAMMER Utility: Change B-Tree, inodes, and dir reblocking params, add rebalance
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Mar 2009 00:22:40 +0000 (17:22 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Mar 2009 00:22:40 +0000 (17:22 -0700)
commit797a0b636b5917dbc5ec2917265e29debaade406
tree03ac93b4582f5bcab71d24aef857eba1c52fd291
parent7185500391d1ec799ae33b2930cc9074159186e0
HAMMER Utility: Change B-Tree, inodes, and dir reblocking params, add rebalance

* The normal cleanup operations now reblock all B-Tree, inode, and directory
  elements in the normal daily reblock mode instead of only the ones in
  fragmented big-blocks.  Bulk data is handled by the 30-day recopy mode.

* Add a new directive 'rebalance' (a future VFS ioctl).  This directive will
  tell the HAMMER VFS to rebalance the B-Tree.  HAMMER B-Trees are always
  balanced by depth but degenerate cases with minimal elements in a node
  can easily build up.  The new directive will rebalance the elements in
  each B-Tree node.

* The hammer cleanup directive was not reblocking directories.  Now it does.

It usually does not take very long to reblock the B-Tree nodes, inodes, or
directory elements.  Reblocking these unconditionally, instead of just
reblocking fragmented allocation areas, keeps the B-Tree in a more optimal
layout, though there is still a lack of correlation between inode numbers
and directory scan order.
sbin/hammer/Makefile
sbin/hammer/cmd_cleanup.c
sbin/hammer/cmd_rebalance.c [new file with mode: 0644]
sbin/hammer/cmd_show.c
sbin/hammer/hammer.8
sbin/hammer/hammer.c
sbin/hammer/hammer.h
sys/vfs/hammer/hammer_ioctl.h