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>
Fri, 22 Jul 2016 05:48:10 +0000 (22:48 -0700)
commit74779181703092463a6f85210dd4fd6e6594ccd6
tree07d00f0f3aa9d71ce865f0386be433c83fd7527e
parenta391a14a3472200021bf4616938068c5e9ee2b58
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