hammer2 - freemap part 2 - cleanup & performance pass
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 18 May 2013 01:17:47 +0000 (18:17 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 18 May 2013 01:44:58 +0000 (18:44 -0700)
commit512beabd66d77a7cca8f73bf69030ffa90f0b9e3
treeac6a562fb8817e91c5ce1fc497f35881de18b28b
parente1c190724ab50463680fb1098d889713e47c79ae
hammer2 - freemap part 2 - cleanup & performance pass

* Increase minimum I/O from 1K to 16K (HAMMER2_LBUFSIZE).

* Adjust some use cases, increasing the smallest indirect block to the
  minimum IO size 4K->16K.

* The BREF_TYPE_FREEMAP_LEAF bitmap is now embedded in the chain, allowing
  us to use the 256 byte bitmaps more safely.  As with inodes, a read-in
  involves using a larger buffer-cache buffer and then copying the data
  into the chain.

* Avoid unnecessary reads from disk when allocating blocks that are less
  than the minimum IO size.  If it is determined that the bitmap bits
  covering the minimum IO size are 0 (unallocated), we pre-validate the
  larger buffer cache buffer so the later bread() does not have to issue
  any actual reads.

  Pre-validation for allocations larger than or equal to the minimum IO
  size is already handled in the chain locking code.

  With this change, a cpdup into H2 will issue mostly writes and is able
  to avoid nearly all reads.

* Make some progress formalizing chain-embedded data.
sys/vfs/hammer2/hammer2.h
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
sys/vfs/hammer2/hammer2_subr.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c