hammer2 - Rewrite internal chain algorithms - stabilization
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Sep 2013 05:57:54 +0000 (22:57 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Sep 2013 06:07:22 +0000 (23:07 -0700)
commit51a0d27c7544b989e6e2e6f6c64cbc4cfcb39f0f
tree0b5a4cf61a22e732dbf8f632e46e14af7652226e
parent1897c66ea31ca9d7b3fb03ba08889054bf36ef04
hammer2 - Rewrite internal chain algorithms - stabilization

* Add temporary guards on a few structures for debugging purposes.

* Verify that blocktables are ordered.

* live_zero is multi-homed, move it out of the chain_core structure and
  into the chain structure.  Also move the COUNTEDBREFS flag

* Unlock the spinlock prior to issuing the atomic fetchadd to decrement
  hammer2_core->sharecnt.  Clean up any hanging chain_layer's when freeing
  a core structure.

* Initialize live_zero to 0 when base is NULL (i.e. if the chain structure
  is in the INITIAL stage).

* Refactor hammer2_chain_find(), hammer2_base_find(), and add
  hammer2_combined_find().  Fix numerous bugs in the key_next
  calculation and ensure that the combined find returns exhaustion
  if the element it finds is outside the requested range.

* Close a delete-duplicate race in hammer2_chain_getparent() and
  in hammer2_chain_lookup().  A delete-duplicate could weasle its
  way in during the parent lock transition.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_vfsops.c