]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "ext4: fix fsx truncate failure"
authorLukas Czerner <lczerner@redhat.com>
Tue, 28 May 2013 03:32:35 +0000 (23:32 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 28 May 2013 03:32:35 +0000 (23:32 -0400)
commit878197df1bff2d75004d6a14021038867594cfb4
treeada51347e6dfe1bf5656d5ba6fc60feba941d007
parent36e75092330a9b53c4d71db80a05756f1199b043
Revert "ext4: fix fsx truncate failure"

This reverts commit 6d1e97ec18668fe34d4761c0f20053fff8b3ddd6.

This commit reintroduces the use of ext4_block_truncate_page() in ext4
truncate operation instead of ext4_discard_partial_page_buffers().

The statement in the commit description that the truncate operation only
zero block unaligned portion of the last page is not exactly right,
since truncate_pagecache_range() also zeroes and invalidate the unaligned
portion of the page. Then there is no need to zero and unmap it once more
and ext4_block_truncate_page() was doing the right job, although we
still need to update the buffer head containing the last block, which is
exactly what ext4_block_truncate_page() is doing.

Moreover the problem described in the commit is fixed more properly with
commit

6169fc296b5ceed9e12fc36279e68f36f2af1945
jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer

This was tested on ppc64 machine with block size of 1024 bytes without
any problems.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c