git: hammer2 - Stabilization, fix bulkfree bugs, change 'df' output

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Jun 27 01:46:49 PDT 2016


commit 470dad1426d4d6202ca22e1905cc293e7f8389b2
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Jun 27 01:37:40 2016 -0700

    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.

Summary of changes:
 sbin/hammer2/cmd_debug.c           |   2 +
 sys/vfs/hammer2/hammer2_bulkfree.c | 108 +++++++++++++++++++++++++++++--------
 sys/vfs/hammer2/hammer2_chain.c    |  18 +++++--
 sys/vfs/hammer2/hammer2_flush.c    |  22 +++++++-
 sys/vfs/hammer2/hammer2_freemap.c  |  14 ++++-
 sys/vfs/hammer2/hammer2_io.c       |   8 +++
 sys/vfs/hammer2/hammer2_vfsops.c   |  12 +++++
 7 files changed, 155 insertions(+), 29 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/470dad1426d4d6202ca22e1905cc293e7f8389b2


-- 
DragonFly BSD source repository



More information about the Commits mailing list