]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: update EOFBLOCKS flag on fallocate properly
authorDmitry Monakhov <dmonakhov@openvz.org>
Tue, 25 Oct 2011 12:15:12 +0000 (08:15 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 25 Oct 2011 12:15:12 +0000 (08:15 -0400)
commitd6b092e37bea673fbde3381278febfe6764569b4
tree0f5b0309f290f5fc23478794c6f4adcd7c18896a
parent1663cad0d82feadb687e27a6bff24afa0acc8565
ext4: update EOFBLOCKS flag on fallocate properly

EOFBLOCK_FL should be updated if called w/o FALLOCATE_FL_KEEP_SIZE
Currently it happens only if new extent was allocated.

TESTCASE:
fallocate test_file -n -l4096
fallocate test_file -l4096
Last fallocate cmd has updated size, but keept EOFBLOCK_FL set. And
fsck will complain about that.

Also remove ping pong in ext4_fallocate() in case of new extents,
where ext4_ext_map_blocks() clear EOFBLOCKS bit, and later
ext4_falloc_update_inode() restore it again.

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