ocfs2: Add refcount tree lock mechanism.
authorTao Ma <tao.ma@oracle.com>
Mon, 24 Aug 2009 03:13:37 +0000 (11:13 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 23 Sep 2009 03:09:29 +0000 (20:09 -0700)
commit374a263e790c4de85844283c098810a92985f623
treea72b1f072b973723ea1cf7def27608717cf1c033
parentc732eb16bf07f9bfb7fa72b6868462471273bdbd
ocfs2: Add refcount tree lock mechanism.

Implement locking around struct ocfs2_refcount_tree.  This protects
all read/write operations on refcount trees.  ocfs2_refcount_tree
has its own lock and its own caching_info, protecting buffers among
multiple nodes.

User must call ocfs2_lock_refcount_tree before his operation on
the tree and unlock it after that.

ocfs2_refcount_trees are referenced by the block number of the
refcount tree root block, So we create an rb-tree on the ocfs2_super
to look them up.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
fs/ocfs2/ocfs2.h
fs/ocfs2/refcounttree.c
fs/ocfs2/refcounttree.h
fs/ocfs2/super.c