hammer2 - Allow chains to be cached
commita7b81974b16971937249f5bdf7b3e48866ce7895
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Jun 2016 23:49:09 +0000 (9 16:49 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Jun 2016 23:49:09 +0000 (9 16:49 -0700)
tree2eb7a5b3a48fd0a6a1bdc5eb43997846743759d4
parent4dc3b92f92c7a2d9582ca7cbd06a5582d54d61be
hammer2 - Allow chains to be cached

* Cache chain structures on the refs 1->0 transition.  We still drop the
  underlying dio and backing data (future optimizations are possible here
  within the DIO subsystem but we have to be careful when it comes to
  leaving kernel buffer cache buffers locked).

  This allows hammer2 to retain a lot of the infrastructure that gets reused
  across multiple system calls without having to constantly reconstitute it,
  improving performance.

* Fix a few recent chain->flags modifications that weren't atomic.  They
  have to be atomic.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.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