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

git: DragonFly_RELEASE_2_4 HAMMER VFS - Fix serious bug when downgrading (and later upgrading) a PFS


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Jan 2010 11:50:00 -0800 (PST)

commit 3c3d3a3639463ff9fd2288693cc9ddde67b16f1e
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Tue Jan 5 11:36:56 2010 -0800

    HAMMER VFS - Fix serious bug when downgrading (and later upgrading) a PFS
    
    * When downgrading a PFS master to a slave the sync-end-tid (in the
      pfs-status) is not updated.  This will cause the data to become
      inaccessible.
    
      Then, when upgrading back to a master the original stale sync-end-tid
      is used to rollback the PFS, effectively destroying its contents.
    
    * We now properly update sync-end-tid when downgrading a PFS.  This
      makes the data accessible in slave mode and prevents the rollback
      when re-upgrading the PFS from destroying any of the master's original
      data.
    
    * Why is a rollback used at all when upgrading you ask?  When a PFS is
      operating as a slave mirroring operations can be interrupted, leaving
      a lot of partially updated records.  Since sync-end-tid is not updated
      until the mirroring operation completes (when in slave mode), these
      partially mirrored records are not visible.
    
      However, if the slave is upgraded to a master any records from
      incomplete mirroring operations must be destroyed.  Hence the rollback
      during an upgrade is a necessary feature under normal operation.
    
    Reported-by: Thomas Nikolajsen

Summary of changes:
 sys/vfs/hammer/hammer_pfs.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3c3d3a3639463ff9fd2288693cc9ddde67b16f1e


-- 
DragonFly BSD source repository



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