hammer2 - Cluster API cleanup
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 24 Mar 2015 01:29:05 +0000 (18:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 24 Mar 2015 01:29:05 +0000 (18:29 -0700)
commitfe73aa5d256e4ce829031e601b0986daee9dd6e9
tree5872d9f3fed08067656b005c62c0ea16d77f290c
parentc00956260d2704c17e71363516aa1070c5e4e4e8
hammer2 - Cluster API cleanup

* Simplify hammer2_cluster_copy() to reduce ref count confusion.  It now
  always refs the underlying chains and the cluster.  The follow-up
  hammer2_cluster_lock() op can then be called with HAMMER2_RESOLVE_NOREF
  to avoid double-refs on the cluster and its underlying chains.

* Simplify hammer2_inode_lock_ex() and hammer2_inode_lock_sh().  These
  functions now use hammer2_cluster_lock() instead of rolling their own.

* Focus is now never set until a cluster is locked.  However, continue
  to cache a default focus in the hammer2_inode's embedded cluster.

* Remove some dead code.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_cluster.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c