hammer2 - flush sequencing part 6 - stabilization pass
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 10 May 2013 09:54:16 +0000 (02:54 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 10 May 2013 09:54:16 +0000 (02:54 -0700)
commitcd189b1e7ab1818608c043e96829a95fb53b2c1b
tree3708c404f8c6e5418325684d016cdca78d02a542
parent4dbd82f6366eed09a0dd98dc45eb9fbadd139b4e
hammer2 - flush sequencing part 6 - stabilization pass

* Fix bug when chains are e.g. delete/duplicated where a flush can occur
  out of order and retire more recent chain structures leaving older
  CHAIN_DELETED structures behind.  This caused the merged chain_find
  and lookup/iteration code to improperly believe a slot was empty when
  in fact the parent's bref array had a valid blockref.

  Fixed by flagging the discrete chain->next_parent linkages with
  CHAIN_IPACTIVE and adding a ref to the chain, which prevents them
  from being retired out of order.  This is currently being done
  unconditionally (and probably has to be done unconditionally).

* Fix bug related to the clearing of SUBMODIFIED during a flush.  Generally
  speaking a flush pass clears SUBMODIFIED if no children were deferred.

  The bug is that higher-level indirect-block chains closer to the root
  are typically only modified during the flush as the deeper chains are
  flushed recursively and rolled up into the parents on the way back up.
  Because of this, these higher-level chains could represent more than one
  flush synchronization point.  When this situation is detected we now
  set SUBMODIFIED here too.

* Consolidate ip->chain adjustments into the hammer2_inode_repoint()
  procedure.  Remove hammer2_inode_put().

* Cleanup some #if 0'd code that I won't be using.
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
sys/vfs/hammer2/hammer2_vnops.c