hammer2 - Stabilization, fix bulkfree bugs, change 'df' output
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 27 Jun 2016 08:37:40 +0000 (01:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 27 Jun 2016 08:37:40 +0000 (01:37 -0700)
commit470dad1426d4d6202ca22e1905cc293e7f8389b2
treec3b0bd634f81f7cb7b6db82cb6f689a9a91d937a
parent6c99642e3f88068d0ee171aa60313efe66abe130
hammer2 - Stabilization, fix bulkfree bugs, change 'df' output

* Automatically delete any indirect nodes which become empty.  This is done
  in the flusher.  Verify that a rm -rf cleans everything out.

* Fix three serious bugs in the bulkfree code.

  (1) A range-check of cbinfo->sstop was using '>' instead of '>=', causing
      a one-element overflow during the scan and potentially corrupting
      memory.

  (2) The live bitmap pointer must be reloaded after calling
      hammer2_chain_modify()!  The old pointer points to a buffer
      which must remain clean, or worse points to a buffer completely
      unrelated to the hammer2 filesystem.

  (3) We were zeroing the temporary bmap, but it actually needs to be
      initialized properly (particularly its reserved areas).  Just
      zeroing it led to reserved areas being improperly marked as
      available for allocation.

* Validate that the free space counter is recovered properly after a
  rm -rf and bulkfree.

* Disable the modify_tid test in the bulkfree code for now and go back to
  forcing a flush.

* Change 'df' reporting.  I was trying to be fancy by compensating for dedup
  to report how big the filesystem would be if nothing were deduped, but it
  just caused confusion.  We now report an unchanging total volume size and
  the actual number of 16KB blocks that are fully free.

* The 'hammer2 freemap' dump now includes all indices, including those
  associated with reserved areas.
sbin/hammer2/cmd_debug.c
sys/vfs/hammer2/hammer2_bulkfree.c
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_io.c
sys/vfs/hammer2/hammer2_vfsops.c