hammer2 - Stabilization, optimization
commit7767d389a9d16876a2fcf4faba411aa322917991
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 25 Jun 2016 17:05:24 +0000 (25 10:05 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 25 Jun 2016 17:49:03 +0000 (25 10:49 -0700)
tree85c37c87928c27bcf202350d2188a9fbbde43c02
parentda4e021faf873612e7b3bb97566bc66c270f8e70
hammer2 - Stabilization, optimization

* Increase the hammer2_io.refs field to 64 bits so we can add a few more
  control bits.

* Track whether invalidation is ok at the DIO level for full-sized (64KB)
  data blocks.  We continue to use the slightly less-capable CHAIN_DEDUP
  flag for smaller data blocks (this flag gets set on frontend->backend
  flush whereas the DIO level flag is only cleared when a block is actually
  reused for deduplication).

* Separate vfs.hammer2.cluster_enable into cluster_read and cluster_write.
  Leave cluster_read enabled with a read-ahead of 4 blocks.  Disable
  cluster_write for now, but still set B_CLUSTEROK in the bdwrite().

  This allows the frontend to 'flush' data to the backend without
  initiating disk I/O on the block device, giving us a chance to discard
  the data later if it winds up being temporary.

* Remove an improper BUF_KERNPROC(dio->bp) in the case where a different
  thread owns the in-progress DIO.

* Defer setting of B_INVAL | B_RELBUF to when the DIO is in lastdrop.

* Add missing brelse() in the hammer2_read_file() error path.  Add missing
  B_CLUSTEROK in hammer2_write_file().

* The bulkfree code now ensures that the INVALOK bit in any related DIO
  for a freed block is cleared, preventing accidental invalidations on
  reuse.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_bulkfree.c
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_io.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c