[Ocfs2-devel] [PATCH 17/41] ocfs2: Add CoW support.
TaoMa
tao.ma at oracle.com
Wed Aug 26 01:17:00 PDT 2009
Joel Becker wrote:
> 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?
>
should be. Although our current code handle this gracefully, we can't
tell whether future caller forget this basic condition. So I have no
objection to it. I will add it later.
> 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.
>
Sure. thanks.
Regards,
Tao
More information about the Ocfs2-devel
mailing list