hammer2 - Clean DIO invalidation flags in more cases
commitef5c6e6835c32c5fbb38f6445cd87c439a4e3f95
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 22 Aug 2017 23:44:41 +0000 (22 16:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 22 Aug 2017 23:44:41 +0000 (22 16:44 -0700)
tree5df87bba31c2fcf41d856cecef8baede5372ca85
parent62a2c422ea86449cbba170c4adee0b82e003f971
hammer2 - Clean DIO invalidation flags in more cases

* DIO invalidation state allows a (64KB) buffer to be allocated from disk
  without reading it, retaining this knowledge across a freemap allocation
  into the chain.  It is primarily used by the freemap allocator when
  digging into new (previously fully unallocated) 64KB blocks to avoid
  unnecessary disk I/O.

* Clear DIO invalidation flags for data blocks being adjusted by
  bulkfree for any transition rather than just for the 11->10 transition.
  This is an attempt to cleanup corruption which can occur during heavy
  I/O + concurrent bulkfree operation.

* When clearing DIO invalidation state, clear both flags rather than just
  one flag.
sys/vfs/hammer2/hammer2_bulkfree.c
sys/vfs/hammer2/hammer2_io.c