DragonFly BSD
DragonFly commits List (threaded) for 2012-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: DragonFly_RELEASE_3_2 HAMMER VFS - Use full-block undos for B-Tree nodes

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Oct 2012 10:13:49 -0700 (PDT)

commit 7302df595a77b6f92b5ac48098ad6ed62bc5401d
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sat Oct 13 10:03:03 2012 -0700

    HAMMER VFS - Use full-block undos for B-Tree nodes
    * Use a full-block undos instead of small byte-range undos for
      B-Tree nodes.
      There is no bug here per-say, but we are trying to improve
      HAMMER's ability to recover after a power failure where a disk
      drive is writing to the platter at the time of the failure.
      While we have no control over any unrelated sectors that might
      get smashed by such an event, the concern is that sectors being
      specifically written might get corrupted beyond the ability for
      the byte-range undo to fix.
      The reason is that if, say, only 50 bytes in a B-Tree node need
      updating, HAMMER must still do a 16K physical write to disk, so
      really any portion of that 16K can wind up corrupt on a power
      failure, not just the 50 bytes being changed.
      So instead of writing a byte-ranged 50-byte UNDO we now write
      a 16K undo for B-Tree elements.
    * The hope is that this will improve cases where HAMMER has become
      unmountable due to CRC errors in the B-Tree closer to the root of
      the B-Tree (which are usually updated to update only the mirror_tid)
    Reported-by: sgeorge, marino

Summary of changes:
 sys/vfs/hammer/hammer.h        |   15 +++++++++++----
 sys/vfs/hammer/hammer_vfsops.c |    6 ++++++
 2 files changed, 17 insertions(+), 4 deletions(-)


DragonFly BSD source repository

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]