git: hammer2 - stabilization - Fix a number of bugs revealed by fsx and fsstress.

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Aug 31 20:32:10 PDT 2015


commit 76f85faa70e0e580c2cf46832aaf462e53367731
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Aug 31 20:20:22 2015 -0700

    hammer2 - stabilization - Fix a number of bugs revealed by fsx and fsstress.
    
    * Fix block rewriting against deduped data (dedup_off != 0 in call to
      hammer2_chain_resize()).  It was hitting an assertion due to chain->bytes
      not being properly updated.
    
    * A coarse lock is required on the pfs around any link() or rename() which
      needs to mess with hardlink targets.
    
    * Fix an inode meta.nlinks race between the frontend and the backend.  The
      frontend tracks a master copy of the inode.  The backend must also adjust
      meta.nlinks during link and unlink operations because it reads the field
      to determine if the hardlink target should be removed or not.
    
      This required fixes in hammer2_xop_nlink() and hammer2_xop_nremove() and
      some functional augmentation to hammer2_xop_nlink().
    
    * Leave the target inode locked through the whole rename sequence, the
      hardlink target shifts are just too complex (for now) to be able to rely
      on inode locks.
    
    * Fix an incorrect shared lock in hammer2_xop_nrename() which could result
      in a parent modification being made while held shared instead of exclusive.
    
    * Add debug output for an issue in hammer2_xop_nrename() that has not yet
      been fixed (kprintf... ENOENT).

Summary of changes:
 sys/vfs/hammer2/hammer2.h        |   2 +
 sys/vfs/hammer2/hammer2_chain.c  |   2 +
 sys/vfs/hammer2/hammer2_vfsops.c |   1 +
 sys/vfs/hammer2/hammer2_vnops.c  |  55 +++++++++++-
 sys/vfs/hammer2/hammer2_xops.c   | 180 +++++++++++++++++++++++++++------------
 5 files changed, 183 insertions(+), 57 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/76f85faa70e0e580c2cf46832aaf462e53367731


-- 
DragonFly BSD source repository



More information about the Commits mailing list