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

git: hammer2 hammer2 - Fix lost flush


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 20 May 2012 11:26:19 -0700 (PDT)

commit 26b047fa2d693b02fafbb86a1b2448ce38a4e84c
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sun May 20 11:12:58 2012 -0700

    hammer2 - Fix lost flush
    
    * hammer2 allows the buffer cache buffers related to MODIFIED but unlocked
      chains to be retired by the OS.  In this situation hammer2 does not want
      to bdwrite() the buffer again unless additional modifications are made,
      even though the MODIFIED bit in the chain remains set throughout the
      entire sequence.
    
    * Fix a case where these additional modifications were not properly flagging
      for the buffer cache buffer to be retired with a bdwrite(), causing data
      loss.  This is related to the DIRTYBP chain flag.
    
    * Make further adjustments to the DIRTYBP chain flag.
    
    * Also fix a case where the MOVED bit might not get properly set when a
      block is resized.  The problem was masked by the fact that a resize
      only occurs on data blocks and only during a write(), so the related
      buffer was being marked MODIFIED anyway.  However, the resize code still
      needed to be corrected.
    
    * Add some debugging to 'hammer2 stat' to make it easier to poke around
      related kernel structures.

Summary of changes:
 sbin/hammer2/cmd_stat.c         |    3 +-
 sys/vfs/hammer2/hammer2_chain.c |   41 ++++++++++++++++++++++++++++++++------
 sys/vfs/hammer2/hammer2_inode.c |    5 ++++
 sys/vfs/hammer2/hammer2_ioctl.c |    1 +
 sys/vfs/hammer2/hammer2_ioctl.h |    1 +
 5 files changed, 43 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/26b047fa2d693b02fafbb86a1b2448ce38a4e84c


-- 
DragonFly BSD source repository



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