hammer2 - Work on concurrent bulkfree stability
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Aug 2017 22:52:45 +0000 (15:52 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Aug 2017 22:52:45 +0000 (15:52 -0700)
commit0b8efeb7d8bb32a0e5c57bd87eef12569e81b294
tree44918e99ab56028bf3ef46db9845a3f857af04d2
parent841ef0b120b79a9af0fd60eadd67fd847e8b8290
hammer2 - Work on concurrent bulkfree stability

* The dedup bits in the DIO structure must be set atomically with
  the setting of the bitmap bits in the freemap to avoid racing
  bulkfree.

* dedup bits are normally deleted on the 11->10 transition in bulkfree,
  and asserted to be deleted on the 10->00 transition. Also delete
  dedup bits when a modified chain with no parent is destroyed, and
  for a chain's prior data reference when it is being replaced by a
  new data reference.

* Clean up the DIO dedup management code.

* Clean up the DIO allocation code.

* Cap the size of the DIO cache to 100000 elements for now, if nbuf * 2
  is greater.
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_freemap.c
sys/vfs/hammer2/hammer2_io.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_vfsops.c