hammer2 - Increase size of blockref, refactor freemap.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 May 2015 21:41:36 +0000 (14:41 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 May 2015 21:53:12 +0000 (14:53 -0700)
commit5cebbe36266c384e5bb3f6a9a2364cdd7d750fe1
treede6d025ad2ef8aabb07739e278f045957b1f095d
parentf43cf1b194455de2320233b8edd78c25468435b9
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.
sbin/hammer2/cmd_debug.c
sbin/hammer2/cmd_stat.c
sbin/newfs_hammer2/newfs_hammer2.c
sys/vfs/hammer2/DESIGN
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_bulkscan.c
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_disk.h
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_inode.c