git: hammer2 - Clean DIO invalidation flags in more cases

Matthew Dillon dillon at
Tue Aug 22 21:27:39 PDT 2017

commit ef5c6e6835c32c5fbb38f6445cd87c439a4e3f95
Author: Matthew Dillon <dillon at>
Date:   Tue Aug 22 16:44:41 2017 -0700

    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.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 16 ++++++++++++----
 sys/vfs/hammer2/hammer2_io.c       |  9 ++++++---
 2 files changed, 18 insertions(+), 7 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list