[Ocfs2-devel] [PATCH 08/41] ocfs2: Basic tree root operation.
Joel Becker
Joel.Becker at oracle.com
Wed Aug 19 16:30:39 PDT 2009
On Tue, Aug 18, 2009 at 02:19:09PM +0800, Tao Ma wrote:
> + spin_lock(&osb->osb_lock);
> + tree = ocfs2_find_refcount_tree(osb, first_blkno);
> +
> + /*
> + * The tree has been deleted and recreated. So remove the old
> + * tree in this node.
> + */
How about this:
/*
* We've just created a new refcount tree in this block. If
* we found a refcount tree on the ocfs2_super, it must be
* one we just deleted. We free the old tree before
* inserting the new tree.
*/
> + BUG_ON(tree && tree->rf_generation == new_tree->rf_generation);
> + if (tree)
> + ocfs2_erase_refcount_tree_from_list_no_lock(osb, tree);
> + ocfs2_insert_refcount_tree(osb, new_tree);
> + spin_unlock(&osb->osb_lock);
--
"Time is an illusion, lunchtime doubly so."
-Douglas Adams
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-devel
mailing list