hammer2 - serialized flush work part 3
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Feb 2013 00:03:59 +0000 (16:03 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Feb 2013 00:03:59 +0000 (16:03 -0800)
commit10252dc74a966f1dbb2cb131b287e03d95807a15
tree7c8a139a6af64aa673a03f5089df487ef7f74743
parentb59a64799ba0269e1a7b27c6f898121dde28049e
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.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_subr.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c