diff options
author | Tao Ma <boyu.mt@taobao.com> | 2012-12-10 14:06:02 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-12-10 14:06:02 -0500 |
commit | 0d812f77b36c16dff692390508155de2c7f95ea3 (patch) | |
tree | 18bf309f2e7a9fb6637ae8385a07f86eb5c05afd /fs/ext4/xattr.h | |
parent | 941919856c11d4dd11d4fcabb4dab58bd2b146bf (diff) | |
download | linux-0d812f77b36c16dff692390508155de2c7f95ea3.tar.gz linux-0d812f77b36c16dff692390508155de2c7f95ea3.tar.bz2 linux-0d812f77b36c16dff692390508155de2c7f95ea3.zip |
ext4: evict inline data out if we need to strore xattr in inode
Now we that store data in the inode, in case we need to store some
xattrs and inode doesn't have enough space, Andreas suggested that we
should keep the xattr(metadata) in and data should be pushed out. So
this patch does the work.
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 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h index 5c7e55edfe6c..1be243aab01b 100644 --- a/fs/ext4/xattr.h +++ b/fs/ext4/xattr.h @@ -122,9 +122,9 @@ extern int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, extern int ext4_xattr_ibody_get(struct inode *inode, int name_index, const char *name, void *buffer, size_t buffer_size); -extern int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, - struct ext4_xattr_info *i, - struct ext4_xattr_ibody_find *is); +extern int ext4_xattr_ibody_inline_set(handle_t *handle, struct inode *inode, + struct ext4_xattr_info *i, + struct ext4_xattr_ibody_find *is); extern int ext4_has_inline_data(struct inode *inode); extern int ext4_get_inline_size(struct inode *inode); @@ -187,6 +187,9 @@ extern struct buffer_head *ext4_get_first_inline_block(struct inode *inode, extern int ext4_inline_data_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, int *has_inline); +extern int ext4_try_to_evict_inline_data(handle_t *handle, + struct inode *inode, + int needed); # else /* CONFIG_EXT4_FS_XATTR */ static inline int |