]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix xfstests 75, 112, 127 punch hole failure
authorAllison Henderson <achender@linux.vnet.ibm.com>
Mon, 22 Aug 2011 19:00:53 +0000 (15:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 22 Aug 2011 19:00:53 +0000 (15:00 -0400)
commit1012addb24511b52353b4859f1763c32105df6e8
tree1e6f22de452f8fd1e5e54bdb084e3cb7335ebe03
parentb870200df773427c1ca0726f8c44da87088ea04e
ext4: fix xfstests 75, 112, 127 punch hole failure

This patch addresses a bug found by xfstests 75, 112, 127
when blocksize = 1k

This bug happens because the punch hole code only zeros
out non block aligned regions of the page.  This means that if the
blocks are smaller than a page, then the block aligned regions of
the page inside the hole are left un-zeroed, and their buffer heads
are still mapped.  This bug is corrected by using
ext4_discard_partial_page_buffers to properly zero the partial page
at the head and tail of the hole, and unmap the corresponding buffer
heads

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