hammer2 - refactor some chain bits, stabilization
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 3 Sep 2015 04:11:08 +0000 (21:11 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 3 Sep 2015 04:11:08 +0000 (21:11 -0700)
commit3f4ec3cf3c60137ae82230d6581889b4bdc1c12b
tree4414306bfee79d91db74d32b23a686fbf9083b94
parentf5331ec22e7cc6e78802fd865b2652986c12168d
hammer2 - refactor some chain bits, stabilization

* Refactor the hammer2_chain_t MODIFIED and UPDATE flags to not
  reference the chain.

* Automatically flag DESTROY on a chain on last-drop if chain->parent is
  NULL, and automatically clear UPDATE and try to clear MODIFY.  Add the
  chain to the delayed-flush queue if MODIFIED cannot be cleared.

* Fix a flags bug in hammer2_chain_hardlink_find() which could deadlock
  competing threads.

* The collect code now aggregates errors and the cluster check code now
  also aggregates errors.  This allows feeders to feed an error code to
  the collector.

* Fix rmdir and rename to disallow removal of non-empty directories.

* hammer2_inode_xop_flush() now proceeds with a flush if hmp->flushq
  is not empty, even if the chain is not marked for flushing.  This
  still needs some work.

* Add a sideq for dirty inodes that might have to be flushed.  Used for
  unlinked dirty inodes which might still be open.

* Call hammer2_inode_modify() whenever possible instead of setting the
  HAMMER2_INODE_MODIFIED flag manually.

* Test for chain leaks against blogbench, fsx, and fsstress.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_cluster.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_thread.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c
sys/vfs/hammer2/hammer2_xops.c