[Ocfs2-tools-devel] [PATCH 39/50] fsck.ocfs2: Check refcount of clusters.v3

Joel Becker Joel.Becker at oracle.com
Mon Feb 8 18:02:40 PST 2010


On Wed, Feb 03, 2010 at 04:29:13PM +0800, Tao Ma wrote:
> +/*
> + * Check all the files sharing the tree and if there is a file contains
> + * the (p_cpos, len) with refcounted flag, we clear it.
> + * Note:
> + * This function is only called when checking a continuous clusters.
> + * The pair (p_cpos, len) is a part of the original tuple we get from
> + * get_refcounted_extent, so it can't be in 2 different refcount_extent.
> + */
> +static errcode_t o2fsck_clear_refcount(o2fsck_state *ost,
> +				       struct refcount_tree *tree,
> +				       uint64_t p_cpos,
> +				       uint32_t len)
> +{
> +	errcode_t ret = 0;
> +	struct refcount_extent *extent;
> +	struct refcount_file *file;
> +	struct list_head *p, *next;
> +	struct rb_node **node;

	Why is node a ** instead of just a *?  You never assign to
'*node', so I don't think you're overwriting an existing pointer
location.
	Otherwise, I think it looks pretty good.  I'm assuming you've
tested it ;-)

Joel

-- 

Life's Little Instruction Book #20

	"Be forgiving of yourself and others."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list