[Ocfs2-tools-devel] A patch for ocfs2_truncate
tao.ma
tao.ma at oracle.com
Fri Sep 1 02:10:52 PDT 2006
When ocfs2_truncate is called, the file size will be changed. But when
the new size is little than the original one which means we want to
shrink the file size, 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 to global bitmap.
Attachment is the patch.
--
* ** Tao Ma
* Member of Techincal Staff *
Oracle Asia Development Center
Emerging Technology & Solution Development
*
Tel: +86 10 8278 6026
URL: OADC Intranet <http://cdc.oraclecorp.com/>, Oracle.com/cdc
<http://www.oracle.com/cdc/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ocfs2_truncate.patch
Type: text/x-patch
Size: 1078 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20060901/5fa453d0/ocfs2_truncate-0001.bin
More information about the Ocfs2-tools-devel
mailing list