hammer2 - Fix critical bulkfree bug, refactor hammer2_io
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 29 Aug 2017 21:55:42 +0000 (14:55 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 29 Aug 2017 21:55:42 +0000 (14:55 -0700)
commit85b1f267a5c33386e0761edb93a486fce13e8e88
tree8d523b0cf24c6ab57bd385897b0e2dd929c614d2
parentfd399d96fc82973fc5cdfe03245176264021c0f0
hammer2 - Fix critical bulkfree bug, refactor hammer2_io

* The bulkfree scan code was corrupting storage elements allocated beyond
  the 512GB mark due to not resetting the bulk duplicate subtree detection
  heuristic for each new storage range being evaluated.

  Fixed by zeroing out the heuristic in the ranging loop.

* Refactor hammer2_io.c.  This module was originally designed for completely
  asynchronous operation (with callbacks), but the backend chain code was
  subsequently redesigned to use kernel threads for each target device.  I/O
  operations in the kernel threads were issued synchronously.

  Remove all the asynchronous support code, which is like 50% of the module.
  Get rid of the IOCB mechanism entirely.  Simplify the hammer2_io structure
  and flags interactions and simplify the API.

* Add some temporary debugging to the unmount path.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_bulkfree.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