diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-02-09 15:23:03 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-02-09 15:23:03 -0500 |
commit | 95eaefbdececae5e781d76d03fe7472a857c8c7a (patch) | |
tree | abe337e1490ded4166cf4d26f97cd1fe856a84ab /fs/ext4/xattr.h | |
parent | 64044abf05d0842a7fed30e102fa411a744c7d9f (diff) |
ext4: fix the number of credits needed for acl ops with inline data
Operations which modify extended attributes may need extra journal
credits if inline data is used, since there is a chance that some
extended attributes may need to get pushed to an external attribute
block.
Changes to reflect this was made in xattr.c, but they were missed in
fs/ext4/acl.c. To fix this, abstract the calculation of the number of
credits needed for xattr operations to an inline function defined in
ext4_jbd2.h, and use it in acl.c and xattr.c.
Also move the function declarations used in inline.c from xattr.h
(where they are non-obviously hidden, and caused problems since
ext4_jbd2.h needs to use the function ext4_has_inline_data), and move
them to ext4.h.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Tao Ma <boyu.mt@taobao.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/xattr.h')
-rw-r--r-- | fs/ext4/xattr.h | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h index 69eda787a96a..aa25deb5c6cd 100644 --- a/fs/ext4/xattr.h +++ b/fs/ext4/xattr.h | |||
@@ -125,74 +125,6 @@ extern int ext4_xattr_ibody_inline_set(handle_t *handle, struct inode *inode, | |||
125 | struct ext4_xattr_info *i, | 125 | struct ext4_xattr_info *i, |
126 | struct ext4_xattr_ibody_find *is); | 126 | struct ext4_xattr_ibody_find *is); |
127 | 127 | ||
128 | extern int ext4_has_inline_data(struct inode *inode); | ||
129 | extern int ext4_get_inline_size(struct inode *inode); | ||
130 | extern int ext4_get_max_inline_size(struct inode *inode); | ||
131 | extern int ext4_find_inline_data_nolock(struct inode *inode); | ||
132 | extern void ext4_write_inline_data(struct inode *inode, | ||
133 | struct ext4_iloc *iloc, | ||
134 | void *buffer, loff_t pos, | ||
135 | unsigned int len); | ||
136 | extern int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, | ||
137 | unsigned int len); | ||
138 | extern int ext4_init_inline_data(handle_t *handle, struct inode *inode, | ||
139 | unsigned int len); | ||
140 | extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode); | ||
141 | |||
142 | extern int ext4_readpage_inline(struct inode *inode, struct page *page); | ||
143 | extern int ext4_try_to_write_inline_data(struct address_space *mapping, | ||
144 | struct inode *inode, | ||
145 | loff_t pos, unsigned len, | ||
146 | unsigned flags, | ||
147 | struct page **pagep); | ||
148 | extern int ext4_write_inline_data_end(struct inode *inode, | ||
149 | loff_t pos, unsigned len, | ||
150 | unsigned copied, | ||
151 | struct page *page); | ||
152 | extern struct buffer_head * | ||
153 | ext4_journalled_write_inline_data(struct inode *inode, | ||
154 | unsigned len, | ||
155 | struct page *page); | ||
156 | extern int ext4_da_write_inline_data_begin(struct address_space *mapping, | ||
157 | struct inode *inode, | ||
158 | loff_t pos, unsigned len, | ||
159 | unsigned flags, | ||
160 | struct page **pagep, | ||
161 | void **fsdata); | ||
162 | extern int ext4_da_write_inline_data_end(struct inode *inode, loff_t pos, | ||
163 | unsigned len, unsigned copied, | ||
164 | struct page *page); | ||
165 | extern int ext4_try_add_inline_entry(handle_t *handle, struct dentry *dentry, | ||
166 | struct inode *inode); | ||
167 | extern int ext4_try_create_inline_dir(handle_t *handle, | ||
168 | struct inode *parent, | ||
169 | struct inode *inode); | ||
170 | extern int ext4_read_inline_dir(struct file *filp, | ||
171 | void *dirent, filldir_t filldir, | ||
172 | int *has_inline_data); | ||
173 | extern struct buffer_head *ext4_find_inline_entry(struct inode *dir, | ||
174 | const struct qstr *d_name, | ||
175 | struct ext4_dir_entry_2 **res_dir, | ||
176 | int *has_inline_data); | ||
177 | extern int ext4_delete_inline_entry(handle_t *handle, | ||
178 | struct inode *dir, | ||
179 | struct ext4_dir_entry_2 *de_del, | ||
180 | struct buffer_head *bh, | ||
181 | int *has_inline_data); | ||
182 | extern int empty_inline_dir(struct inode *dir, int *has_inline_data); | ||
183 | extern struct buffer_head *ext4_get_first_inline_block(struct inode *inode, | ||
184 | struct ext4_dir_entry_2 **parent_de, | ||
185 | int *retval); | ||
186 | extern int ext4_inline_data_fiemap(struct inode *inode, | ||
187 | struct fiemap_extent_info *fieinfo, | ||
188 | int *has_inline); | ||
189 | extern int ext4_try_to_evict_inline_data(handle_t *handle, | ||
190 | struct inode *inode, | ||
191 | int needed); | ||
192 | extern void ext4_inline_data_truncate(struct inode *inode, int *has_inline); | ||
193 | |||
194 | extern int ext4_convert_inline_data(struct inode *inode); | ||
195 | |||
196 | #ifdef CONFIG_EXT4_FS_SECURITY | 128 | #ifdef CONFIG_EXT4_FS_SECURITY |
197 | extern int ext4_init_security(handle_t *handle, struct inode *inode, | 129 | extern int ext4_init_security(handle_t *handle, struct inode *inode, |
198 | struct inode *dir, const struct qstr *qstr); | 130 | struct inode *dir, const struct qstr *qstr); |