git: hammer2 - serialized flush work part 3

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Jan 31 16:28:58 PST 2013


commit 10252dc74a966f1dbb2cb131b287e03d95807a15
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Jan 31 16:03:59 2013 -0800

    hammer2 - serialized flush work part 3
    
    * Clean up hammer2_inode vs hammer2_chain.  Remove chain->u.ip (the
      backpointer from the chain to the inode), which simplifies a lot
      of things.  This was only used to detect when a vnode might have to
      be recycled but we solve that a different way by adjusting the
      kernel's cache_unlink() code.
    
    * Revamp hammer2_inode_get().  This routine now always kmalloc()'s a new
      hammer2_inode.  In HAMMER2, the hammer2_inode structure is actually
      an indirect pointer to an underlying chain so it does not have to be
      unique.  There can multiple ip's pointing to the same chain.
    
    * Revamp hammer2_inode_put().  The ref on ip->chain is dropped via ip->chain,
      and the (passed_chain) argument is treated separately and does not
      necessarily have to match ip->chain.  This makes hammer2_inode_put()'s API
      comparable to hammer2_inode_unlock_ex(), reducing confusion.
    
    * Depend on adjustments to cache_unlink() and cache_rename() to detect
      vnodes which should be recycled.  This code (in the proper kernel, not
      here) now triggers a deactivation if the vnode related to the namecache
      entry has no refs, allowing HAMMER2 to detect any deletions and vrecycle()
      the vnode immediately.
    
    * Numerous ref/lock fixes.

Summary of changes:
 sys/vfs/hammer2/hammer2.h        |  16 ++--
 sys/vfs/hammer2/hammer2_chain.c  |  54 +----------
 sys/vfs/hammer2/hammer2_inode.c  | 191 ++++++++++++++++++++-------------------
 sys/vfs/hammer2/hammer2_ioctl.c  |   6 +-
 sys/vfs/hammer2/hammer2_subr.c   |   8 ++
 sys/vfs/hammer2/hammer2_vfsops.c |  14 ++-
 sys/vfs/hammer2/hammer2_vnops.c  |  53 ++++++++---
 7 files changed, 165 insertions(+), 177 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/10252dc74a966f1dbb2cb131b287e03d95807a15


-- 
DragonFly BSD source repository



More information about the Commits mailing list