hammer2 - Fix deadlocks, bad assertion, improve flushing.
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Jul 2016 05:48:10 +0000 (22:48 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 Jul 2016 05:39:41 +0000 (22:39 -0700)
commitd7993ba507efd77d28d3f7aa2c71887a429518bb
treebccd6b54263e9935857d7ec0c4bde645a93cf087
parentc0625d87512d60e7c88ec499e778990524b9029c
hammer2 - Fix deadlocks, bad assertion, improve flushing.

* Fix a deadlock in checkdirempty().  We must release the lock on oparent
  before following a hardlink.  If after re-locking chain->parent != oparent,
  return EAGAIN to the caller.

* When doing a full filesystem flush, pre-flush the vnodes with a normal
  transaction to try to soak-up all the compression time and avoid stalling
  user process writes for too long once we get inside the formal flush.

* Fix a flush bug.  Flushing a deleted chain is allowed if it is an inode.
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_xops.c