ext4: Do not zero out uninitialized extents beyond i_size
authorDmitry Monakhov <dmonakhov@openvz.org>
Sun, 16 May 2010 10:00:00 +0000 (06:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 16 May 2010 10:00:00 +0000 (06:00 -0400)
commit21ca087a3891efab4d45488db8febee474d26c68
tree343af5d07c11d614835eac004be36382cec27dc0
parentc35a56a090eacefca07afeb994029b57d8dd8025
ext4: Do not zero out uninitialized extents beyond i_size

The extents code will sometimes zero out blocks and mark them as
initialized instead of splitting an extent into several smaller ones.
This optimization however, causes problems if the extent is beyond
i_size because fsck will complain if there are uninitialized blocks
after i_size as this can not be distinguished from an inode that has
an incorrect i_size field.

https://bugzilla.kernel.org/show_bug.cgi?id=15742

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c