[Ocfs2-tools-devel] [PATCH 12/44] ocfs2: Decrement refcount when truncating refcounted extents.

Joel Becker Joel.Becker at oracle.com
Wed Dec 30 21:12:11 PST 2009


On Mon, Dec 28, 2009 at 05:00:57PM +0800, Tao Ma wrote:
> @@ -322,6 +344,11 @@ errcode_t ocfs2_xattr_tree_truncate(ocfs2_filesys *fs,
>  	int changed;
>  	struct ocfs2_extent_list *el = &xt->xt_list;
>  
> +	/*
> +	 * ino is used to find refcount tree, as we never use refcount
> +	 * in xattr tree, so set it to 0.
> +	 */
> +	ctxt.ino = 0;
>  	ctxt.new_i_clusters = xt->xt_clusters;
>  	ctxt.new_size_in_clusters = 0;

	I know we don't use refcount records in the xattr tree right
now, but couldn't we some day?  What's the harm in adding ino here?  No
extent will have REFCOUNTED_FL anyway.

Joel

-- 

Life's Little Instruction Book #182

	"Be romantic."

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