hammer2 - Flush sequencing
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Mar 2012 04:23:37 +0000 (21:23 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Mar 2012 04:23:37 +0000 (21:23 -0700)
commita92f82c4cc53813fb613ca41d3fecca2502bb759
tree65626c3c42a0357201699529ad6f3979a93a94dc
parentb5a33b64362cd0eb766bd9f14b1822dc6f979798
hammer2 - Flush sequencing

* Add a flag HAMMER2_CHAIN_DIRTYBP to differentiate between clean and
  dirty buffers, separate from HAMMER2_CHAIN_MODIFIED1.  We needed a
  new flag because a buffer can be dirtied and then written out by the
  OS (becoming clean) before the chain hierarchy itself is flushed.

  This fixes an issue where a small percentage of buffers were being
  written out several times without any new changes.

* Clean up HAMMER2_CHAIN_IOFLUSH and implement to reduce double buffering
  overheads, at least for the buffer cache.  The VM backing store might
  still have double-buffered data.

  This reduces the load on the buffer management code in the kernel and
  helps avoid potential deadlocks.

* Unlock the inode when stalling in bwillwrite().  This solves a problem
  where a program stuck in flstik can also stall out the buffer daemons.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_vnops.c