aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYongqiang Yang <xiaoqiangnk@gmail.com>2011-10-29 09:29:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-10-29 09:29:11 -0400
commit02dc62fba89eaee0157752c5f1ba811ef3156e00 (patch)
treed1f8ba664676570fbd6354a8299b0703901a760d /fs
parent81fdbb4a8d34242f0ed048395c4ddc910f1dffbe (diff)
ext4: clean up AGGRESSIVE_TEST code
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/extents.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 05693804813d..652b4dc5dfcb 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -181,12 +181,10 @@ static inline int ext4_ext_space_block(struct inode *inode, int check)
181 181
182 size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header)) 182 size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
183 / sizeof(struct ext4_extent); 183 / sizeof(struct ext4_extent);
184 if (!check) {
185#ifdef AGGRESSIVE_TEST 184#ifdef AGGRESSIVE_TEST
186 if (size > 6) 185 if (!check && size > 6)
187 size = 6; 186 size = 6;
188#endif 187#endif
189 }
190 return size; 188 return size;
191} 189}
192 190
@@ -196,12 +194,10 @@ static inline int ext4_ext_space_block_idx(struct inode *inode, int check)
196 194
197 size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header)) 195 size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
198 / sizeof(struct ext4_extent_idx); 196 / sizeof(struct ext4_extent_idx);
199 if (!check) {
200#ifdef AGGRESSIVE_TEST 197#ifdef AGGRESSIVE_TEST
201 if (size > 5) 198 if (!check && size > 5)
202 size = 5; 199 size = 5;
203#endif 200#endif
204 }
205 return size; 201 return size;
206} 202}
207 203
@@ -212,12 +208,10 @@ static inline int ext4_ext_space_root(struct inode *inode, int check)
212 size = sizeof(EXT4_I(inode)->i_data); 208 size = sizeof(EXT4_I(inode)->i_data);
213 size -= sizeof(struct ext4_extent_header); 209 size -= sizeof(struct ext4_extent_header);
214 size /= sizeof(struct ext4_extent); 210 size /= sizeof(struct ext4_extent);
215 if (!check) {
216#ifdef AGGRESSIVE_TEST 211#ifdef AGGRESSIVE_TEST
217 if (size > 3) 212 if (!check && size > 3)
218 size = 3; 213 size = 3;
219#endif 214#endif
220 }
221 return size; 215 return size;
222} 216}
223 217
@@ -228,12 +222,10 @@ static inline int ext4_ext_space_root_idx(struct inode *inode, int check)
228 size = sizeof(EXT4_I(inode)->i_data); 222 size = sizeof(EXT4_I(inode)->i_data);
229 size -= sizeof(struct ext4_extent_header); 223 size -= sizeof(struct ext4_extent_header);
230 size /= sizeof(struct ext4_extent_idx); 224 size /= sizeof(struct ext4_extent_idx);
231 if (!check) {
232#ifdef AGGRESSIVE_TEST 225#ifdef AGGRESSIVE_TEST
233 if (size > 4) 226 if (!check && size > 4)
234 size = 4; 227 size = 4;
235#endif 228#endif
236 }
237 return size; 229 return size;
238} 230}
239 231