Re: [PATCH] libext2fs: When truncating file, punch out blocks at end

From
Ted Ts'o <tytso@mit.edu>
Date
2012-02-15 20:12:48
Reply to
Darrick J. Wong, 2012-01-07
On Fri, Jan 06, 2012 at 08:47:37PM -0800, Darrick J. Wong wrote:
Currently, ext2fs_file_set_size2 punches out data blocks between the
end of the file and infinity when truncate_block <= old_truncate
(i.e. when you've made the file longer).  This is not a useful
behavior, particularly since it *fails* to punch out the data blocks
when the file is shortened (i.e. truncate_block < old_truncate).
This seems to be the result of the test being backwards, so fix the
code to punch only when the file is getting shorter.

Signed-off-by: Darrick J. Wong <redacted>
Thanks, applied.

						- Ted
Thread (2 messages) 2 messages, 2 authors, last reply 2012-02-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help