git: hammer2 - Increase size of blockref, refactor freemap.

Matthew Dillon dillon at crater.dragonflybsd.org
Wed May 27 14:53:16 PDT 2015


commit 5cebbe36266c384e5bb3f6a9a2364cdd7d750fe1
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed May 27 14:41:36 2015 -0700

    hammer2 - Increase size of blockref, refactor freemap.
    
    I finally buckled under and increase the size of the blockref from 64 bytes
    to 128 bytes.  The negative consequences are relatively minor, and the
    positives are many.
    
    Negative consequences
    
        * 512 blocks per 64KB indirect block instead of 1024.
        * Inode has only 4 built-in blockrefs instead of 8.
        * Indirect block overhead is doubled.
        * Freemap overhead is doubled due to SEGSIZE being 1GB instead of 2GB.
        * Small files will have to push an indirect block sooner (at 256KB).
    
    Positive consequences
    
        * Freemap overhead is still only 0.40% of the storage.
        * Freemap now uses a 32KB indirect block instead of a 64KB indirect block.
    
        * Data and inode statistics can be tracked in the blockref.
        * Check code goes from max-192-bits to max-512-bits.
        * Additional fields now available for future filesystem features.

Summary of changes:
 sbin/hammer2/cmd_debug.c           |  27 +++---
 sbin/hammer2/cmd_stat.c            |   4 +-
 sbin/newfs_hammer2/newfs_hammer2.c |  16 ++--
 sys/vfs/hammer2/DESIGN             |  15 +++-
 sys/vfs/hammer2/hammer2.h          |   4 -
 sys/vfs/hammer2/hammer2_bulkscan.c |  46 +++++-----
 sys/vfs/hammer2/hammer2_chain.c    |  43 +---------
 sys/vfs/hammer2/hammer2_disk.h     | 168 ++++++++++++++++++++++---------------
 sys/vfs/hammer2/hammer2_flush.c    |  27 ------
 sys/vfs/hammer2/hammer2_freemap.c  | 131 +++++++++++++++++------------
 sys/vfs/hammer2/hammer2_inode.c    |   4 +-
 11 files changed, 248 insertions(+), 237 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5cebbe36266c384e5bb3f6a9a2364cdd7d750fe1


-- 
DragonFly BSD source repository



More information about the Commits mailing list