hammer2 - Stabilization
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 28 Aug 2017 17:30:24 +0000 (10:30 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 28 Aug 2017 17:43:09 +0000 (10:43 -0700)
commit30b0abf36bd7410ffa13efe87c8c55f1f9c2e876
tree8bcf62043672c4f45f2187b4630170f373b4a4d4
parent6a165a97a09d7c801bd48b762580cf240e20dd18
hammer2 - Stabilization

* Key test in hammer2_chain_lookup() against DELETED chains no longer
  special-caes a FREEMAP_NODE when trying to find the covering parent
  chain for the range.

* hammer2_chain_create_indirect() now re-tests that chain->parent still
  matches parent after obtaining the locked chain.  There shouldn't be
  a race here, but check anyway.

* Do not try to delete empty indirect nodes in the flush code unless
  the chain's sub-tree is also empty.  Fixes a possible race condition
  on an indirect chain vs the kernel writing buffer cache buffers out.
  I was also concerned about indirect chains in the INITIAL state tripping
  up the test.

* re-test inode flags after inode lock prior to calling
  hammer2_inode_chain_sync() as a simple optimization.
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_vfsops.c