[Ocfs2-devel] [RFC] ocfs2: Make ocfs2_extend_trans really extending.

Joel Becker Joel.Becker at oracle.com
Fri Apr 23 13:45:45 PDT 2010


On Wed, Apr 21, 2010 at 11:29:39AM +0800, Tao Ma wrote:
> I have finished the tests on xattr and reflink(I use reflink for b-tree
> test because it also use b-tree heavily and also it has a stress test
> case which create a b-tree with depth=2 easily). Both test cases works.
> So please consider including it in the merge window. Thanks.

	I think I'm happy to take this patch, but a couple things first.

> I also changed the patch a little in the beginning of ocfs2_extend_trans.
> -	BUG_ON(!nblocks);
> +	if (nblocks <= 0)
> +		return 0;
> +
> The reason is that some b-tree codes now will extend transcation with
> tree depth. So sometimes it may give us a '0' and we will just return back.

	Well, negative nblocks is still a bug, right?  shouldn't we at
least warn or make it an unsigned int?

Joel

-- 

"In a crisis, don't hide behind anything or anybody. They're going
 to find you anyway."
	- Paul "Bear" Bryant

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