aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.h
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2012-12-10 14:05:51 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-12-10 14:05:51 -0500
commitf19d5870cbf72d4cb2a8e1f749dff97af99b071e (patch)
treee919ba96fde504b6d697d1e13abb080d7800f61b /fs/ext4/xattr.h
parent46c7f254543dedcf134ad05091ed2b935a9a597d (diff)
ext4: add normal write support for inline data
For a normal write case (not journalled write, not delayed allocation), we write to the inline if the file is small and convert it to an extent based file when the write is larger than the max inline size. 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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h
index 646c9b9be8ed..db5672206238 100644
--- a/fs/ext4/xattr.h
+++ b/fs/ext4/xattr.h
@@ -141,6 +141,15 @@ extern int ext4_init_inline_data(handle_t *handle, struct inode *inode,
141extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode); 141extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode);
142 142
143extern int ext4_readpage_inline(struct inode *inode, struct page *page); 143extern int ext4_readpage_inline(struct inode *inode, struct page *page);
144extern int ext4_try_to_write_inline_data(struct address_space *mapping,
145 struct inode *inode,
146 loff_t pos, unsigned len,
147 unsigned flags,
148 struct page **pagep);
149extern int ext4_write_inline_data_end(struct inode *inode,
150 loff_t pos, unsigned len,
151 unsigned copied,
152 struct page *page);
144# else /* CONFIG_EXT4_FS_XATTR */ 153# else /* CONFIG_EXT4_FS_XATTR */
145 154
146static inline int 155static inline int
@@ -262,6 +271,23 @@ static inline int ext4_readpage_inline(struct inode *inode, struct page *page)
262{ 271{
263 return 0; 272 return 0;
264} 273}
274
275static inline int ext4_try_to_write_inline_data(struct address_space *mapping,
276 struct inode *inode,
277 loff_t pos, unsigned len,
278 unsigned flags,
279 struct page **pagep)
280{
281 return 0;
282}
283
284static inline int ext4_write_inline_data_end(struct inode *inode,
285 loff_t pos, unsigned len,
286 unsigned copied,
287 struct page *page)
288{
289 return 0;
290}
265# endif /* CONFIG_EXT4_FS_XATTR */ 291# endif /* CONFIG_EXT4_FS_XATTR */
266 292
267#ifdef CONFIG_EXT4_FS_SECURITY 293#ifdef CONFIG_EXT4_FS_SECURITY