[Ocfs2-devel] [PATCH 17/41] ocfs2: Add CoW support.

Joel Becker Joel.Becker at oracle.com
Tue Aug 25 12:30:53 PDT 2009


On Mon, Aug 24, 2009 at 11:04:12PM +0800, Tao Ma wrote:
> This patch try CoW support for a refcounted record.

	Overall the series looks good.  It needs to be rebased against
the latest merge-window branch.
	I was wondering, though.  In ocfs2_refcount_cow(), should we
make sure that write_len is sane wrt max_cpos?  You added that (correct)
check for max_cpos in cal_cow_clusters().  but ocfs2_refcount_cow() is
defined as ensuring cpos+write_len is safe.
	Now, I think this is correct in the code.  The truncate CoW
passes a write_len of 1 and a max_cpos of cpos+1.  So perhaps at the top
of ocfs2_refcount_cal_cow_clusters() we should BUG_ON(cpos+write_len >
max_cpos)?  Does that sound correct to you?
	If yes, add it.  If no, don't.  Rebase against merge-window and
I'll pull later tonight or in the morning (my time) depending on when I
see it.
	It's ready to go, thank you for all the hard work!

Joel

-- 

Life's Little Instruction Book #510

	"Count your blessings."

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