hammer2 - Fix misc bugs
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 27 Oct 2013 05:09:28 +0000 (22:09 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 27 Oct 2013 05:09:28 +0000 (22:09 -0700)
commitc057466c48d9aa2ac99dac17befc3aa871a548bc
tree810e946970b187cff50c61e71b9678965cef5bd2
parentb08327b74ec33fb870bb54bf3841dae1c4932a12
hammer2 - Fix misc bugs

* Move the live_zero optimization from hammer2_chain to
  hammer2_chain_core.  It is only applicable to the core
  and delete-duplicate operations can mess up the cache.

* Move the HAMMER2_CHAIN_COUNTEDBREFS flag to HAMMER2_CORE_COUNTEDBREFS.
  It is only applicable to the core and delete-duplication operations
  can really mess up calculations of live_count otherwise.

* Don't bump live_count if inserting a deleted chain.

* The vp in the hammer2_sync_scan2() is not locked on purpose.  Use the
  synclist token interlock to safely ref the hammer2_inode before
  potentially blocking, otherwise it can get ripped out from under us.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_vfsops.c