HAMMER Utilities: Performance adjustments, bug fixes.
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 1 Jun 2008 20:59:29 +0000 (20:59 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 1 Jun 2008 20:59:29 +0000 (20:59 +0000)
commit7e1ba5da1bae8a66b32f6edfa6d77fb4afd95833
tree9944417a5fd8ebcc7a7e67e064f22ff7de6eecfb
parent799e4f0bd4708e2bd5a7d119b1a8f9b072a946c8
HAMMER Utilities: Performance adjustments, bug fixes.

* Newfs_hammer now pre-allocates the layer1 and layer2 blockmap blocks,
  and pre-sizes each blockmap to 4x the initial filesystem size instead
  of 100x the initial filesystem size.

  The blockmap can be dynamically resized at any time, given a little code.
  In addition, there is simply no need to give it a 100x initial dynamic
  range.  This only bloats the size of the layer-2 map unnecessarily.

* Change alloc_blockmap() to use rootmap->next_offset for allocations
  instead of rootmap->alloc_offset and fix a bug where rootmap->phys_offset
  was improperly being incremented (it is a fixed field once set).

  The bug was in a code-path that could not by executed by current
  incarnations of newfs_hammer.
sbin/hammer/hammer_util.h
sbin/hammer/ondisk.c
sbin/newfs_hammer/newfs_hammer.c