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>
このコミットが含まれているのは:
Tao Ma
2012-12-10 14:06:03 -05:00
committed by Theodore Ts'o
コミット 0c8d414f16
3個のファイルの変更48行の追加0行の削除

ファイルの表示

@@ -192,6 +192,7 @@ extern int ext4_try_to_evict_inline_data(handle_t *handle,
int needed);
extern void ext4_inline_data_truncate(struct inode *inode, int *has_inline);
extern int ext4_convert_inline_data(struct inode *inode);
# else /* CONFIG_EXT4_FS_XATTR */
static inline int
@@ -420,6 +421,10 @@ static inline void ext4_inline_data_truncate(struct inode *inode,
return;
}
static inline int ext4_convert_inline_data(struct inode *inode)
{
return 0;
}
# endif /* CONFIG_EXT4_FS_XATTR */
#ifdef CONFIG_EXT4_FS_SECURITY