]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix fsx truncate failure
authorAllison Henderson <achender@linux.vnet.ibm.com>
Wed, 7 Sep 2011 01:49:44 +0000 (21:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 7 Sep 2011 01:49:44 +0000 (21:49 -0400)
commit6d1e97ec18668fe34d4761c0f20053fff8b3ddd6
tree5b226cfe59cc9351b9d870a5c31cdfe4f5544652
parentd49213e9b041899b2bdff1805dae976d6b6fc2e9
ext4: fix fsx truncate failure

While running extended fsx tests to verify the first
two patches, a similar bug was also found in the
truncate operation.

This bug happens because the truncate routine only zeros
the unblock aligned portion of the last page.  This means
that the block aligned portions of the page appearing after
i_size are left unzeroed, and the buffer heads still mapped.

This bug is corrected by using ext4_discard_partial_page_buffers
in the truncate routine to zero the partial page and unmap
the buffer headers.

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/indirect.c