hammer2 - redo the flush collision handling
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 13 Dec 2012 23:26:28 +0000 (15:26 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 13 Dec 2012 23:26:28 +0000 (15:26 -0800)
commit5f6853dfb2a795dd65d343b017f9c34c7cfb248d
tree9c11caa935b7631faa5cfab8d8a5db612ed8a9a6
parentfd0e992362e1a9912db1ca32ead4df3edee67221
hammer2 - redo the flush collision handling

* Add HAMMER2_CHAIN_ONRBTREE and change HAMMER2_CHAIN_DELETED.  The DELETED
  flag now indicates a chain has been deleted (as in unlink, rmdir, truncate,
  etc) but could not be removed due to a conflicting flush.

  DELETED means something different from dropped chains with 0 refs which
  wind up sticking around due to the lastdrop code not being able to
  acquire a lock on the parent or colliding with a flush.  0-ref chains
  can be considered to cache clean media state when it comes down to it.
  (modified chains have a ref and so don't hit the lastdrop code).

* The flush code is now able to reliably unlock the chain parent when
  processing a child.

* Clean up a number of flush cases.

* Began to add error handling in the hammer2_chain_create() path.  The path
  now handles EAGAIN errors when insertions would collide with a flush.
  (The wait/retry code is currently just a sleep/retry).

* Removed the MAYDELETE junk.  It was too junky.

*
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_vnops.c