[Ocfs2-tools-devel] A patch for ocfs2_truncate of libocfs2 in ocfs2-tools

Sunil Mushran Sunil.Mushran at oracle.com
Wed Sep 13 18:02:06 PDT 2006


This looks good. However, I would like Joel to review it too.

tao.ma wrote:
> In libocfs2, ocfs2_truncate is used to change a file's size. But when
> the new size is little than the original one which means we want to
> shrink the file, the clusters will not be released and the file's
> extend record will not be changed.
> There are 2 places that need modification.
> 1. In ocfs2_truncate clusters is treated as uint32_t and passed into
> following function, while in truncate_iterate, it is treated as
> uint64_t, so the right number will not be got and extend record will not
> be changed.
> 2. In update_leaf_rec, the wrong number and len of free cluster is got
> and the cluster will not be released in the global bitmap.
> Attachment is the patch.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>   



More information about the Ocfs2-tools-devel mailing list