git: hammer2 - redo the flush collision handling

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Dec 13 15:34:00 PST 2012


commit 5f6853dfb2a795dd65d343b017f9c34c7cfb248d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Dec 13 15:26:28 2012 -0800

    hammer2 - redo the flush collision handling
    
    * Add HAMMER2_CHAIN_ONRBTREE and change HAMMER2_CHAIN_DELETED.  The DELETED
      flag now indicates a chain has been deleted (as in unlink, rmdir, truncate,
      etc) but could not be removed due to a conflicting flush.
    
      DELETED means something different from dropped chains with 0 refs which
      wind up sticking around due to the lastdrop code not being able to
      acquire a lock on the parent or colliding with a flush.  0-ref chains
      can be considered to cache clean media state when it comes down to it.
      (modified chains have a ref and so don't hit the lastdrop code).
    
    * The flush code is now able to reliably unlock the chain parent when
      processing a child.
    
    * Clean up a number of flush cases.
    
    * Began to add error handling in the hammer2_chain_create() path.  The path
      now handles EAGAIN errors when insertions would collide with a flush.
      (The wait/retry code is currently just a sleep/retry).
    
    * Removed the MAYDELETE junk.  It was too junky.
    
    *

Summary of changes:
 sys/vfs/hammer2/hammer2.h       |   16 +-
 sys/vfs/hammer2/hammer2_chain.c |  443 +++++++++++++++++++++------------------
 sys/vfs/hammer2/hammer2_inode.c |   70 +++++--
 sys/vfs/hammer2/hammer2_vnops.c |   41 +++-
 4 files changed, 323 insertions(+), 247 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5f6853dfb2a795dd65d343b017f9c34c7cfb248d


-- 
DragonFly BSD source repository



More information about the Commits mailing list