diff options
author | Tao Ma <boyu.mt@taobao.com> | 2012-12-10 14:06:03 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-12-10 14:06:03 -0500 |
commit | 0c8d414f163f5d35e43a4de7a6e5ee8c253fcccf (patch) | |
tree | 7db57d3b2926408bda5bad880896ee4ec384f398 /fs/ext4/xattr.h | |
parent | aef1c8513c1f8ae076e22ea2a57eff5835578e75 (diff) |
ext4: let fallocate handle inline data correctly
If we are punching hole in a file, we will return ENOTSUPP.
As for the fallocation of some extents, we will convert the
inline data to a normal extent based file first.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.h')
-rw-r--r-- | fs/ext4/xattr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h index 1a71a97e14ad..4222388c772f 100644 --- a/fs/ext4/xattr.h +++ b/fs/ext4/xattr.h | |||
@@ -192,6 +192,7 @@ extern int ext4_try_to_evict_inline_data(handle_t *handle, | |||
192 | int needed); | 192 | int needed); |
193 | extern void ext4_inline_data_truncate(struct inode *inode, int *has_inline); | 193 | extern void ext4_inline_data_truncate(struct inode *inode, int *has_inline); |
194 | 194 | ||
195 | extern int ext4_convert_inline_data(struct inode *inode); | ||
195 | # else /* CONFIG_EXT4_FS_XATTR */ | 196 | # else /* CONFIG_EXT4_FS_XATTR */ |
196 | 197 | ||
197 | static inline int | 198 | static inline int |
@@ -420,6 +421,10 @@ static inline void ext4_inline_data_truncate(struct inode *inode, | |||
420 | return; | 421 | return; |
421 | } | 422 | } |
422 | 423 | ||
424 | static inline int ext4_convert_inline_data(struct inode *inode) | ||
425 | { | ||
426 | return 0; | ||
427 | } | ||
423 | # endif /* CONFIG_EXT4_FS_XATTR */ | 428 | # endif /* CONFIG_EXT4_FS_XATTR */ |
424 | 429 | ||
425 | #ifdef CONFIG_EXT4_FS_SECURITY | 430 | #ifdef CONFIG_EXT4_FS_SECURITY |