aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2011-10-25 08:15:12 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-10-25 08:15:12 -0400
commita4e5d88b1b24827f4f6a3cba43228936a67d81ba (patch)
tree0f5b0309f290f5fc23478794c6f4adcd7c18896a /fs/ext4/ext4.h
parent750c9c47a5f9daa88333ac435a1afe4d4b428230 (diff)
downloadkernel_samsung_smdk4412-a4e5d88b1b24827f4f6a3cba43228936a67d81ba.zip
kernel_samsung_smdk4412-a4e5d88b1b24827f4f6a3cba43228936a67d81ba.tar.gz
kernel_samsung_smdk4412-a4e5d88b1b24827f4f6a3cba43228936a67d81ba.tar.bz2
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>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 4546da4..3647ae0 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -539,6 +539,8 @@ struct ext4_new_group_data {
#define EXT4_GET_BLOCKS_PUNCH_OUT_EXT 0x0020
/* Don't normalize allocation size (used for fallocate) */
#define EXT4_GET_BLOCKS_NO_NORMALIZE 0x0040
+ /* Request will not result in inode size update (user for fallocate) */
+#define EXT4_GET_BLOCKS_KEEP_SIZE 0x0080
/*
* Flags used by ext4_free_blocks