hammer2 - Fix indefinite dirty chains due to rename v5.0.2
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 2 Dec 2017 19:06:30 +0000 (11:06 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 2 Dec 2017 19:09:26 +0000 (11:09 -0800)
commitb479b18f8d1d047fbe99e46084e9aeff702c62f2
tree918c79e43c7cd05e26b35950f2b38bcb4799d6f6
parentc49a4de501181d491b509ef17733d8a65511487a
hammer2 - Fix indefinite dirty chains due to rename

* Do not call cache_setunresolved() on tnch before calling
  cache_rename().  Doing so prevents cache_rename() from properly
  setting VREF_FINALIZE on the vnode.  Since the deleted inode is
  no longer in the chain hierarchy the related chains can remain
  dirty indefinitely (until the vnode is reused or the filesystem
  is unmounted).

* This fixes inmem dirty chain accounting and 'chnmem' stalls.
sys/vfs/hammer2/hammer2_vnops.c