aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/ialloc.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-09-27 04:49:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:09 -0400
commitae6ddcc5f24d6b06ae9231dc128904750a4155e0 (patch)
tree93c6e20b513f39b616af101dabe9b756f7300d0d /fs/ext3/ialloc.c
parente7ab8d65055e9b9dfc131d0467cfc5a8368d7ee4 (diff)
[PATCH] ext3 and jbd cleanup: remove whitespace
Remove whitespace from ext3 and jbd, before we clone ext4. Signed-off-by: Mingming Cao<cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3/ialloc.c')
-rw-r--r--fs/ext3/ialloc.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 36546ed36a1..5e288368499 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -216,7 +216,7 @@ static int find_group_dir(struct super_block *sb, struct inode *parent)
216 continue; 216 continue;
217 if (le16_to_cpu(desc->bg_free_inodes_count) < avefreei) 217 if (le16_to_cpu(desc->bg_free_inodes_count) < avefreei)
218 continue; 218 continue;
219 if (!best_desc || 219 if (!best_desc ||
220 (le16_to_cpu(desc->bg_free_blocks_count) > 220 (le16_to_cpu(desc->bg_free_blocks_count) >
221 le16_to_cpu(best_desc->bg_free_blocks_count))) { 221 le16_to_cpu(best_desc->bg_free_blocks_count))) {
222 best_group = group; 222 best_group = group;
@@ -226,30 +226,30 @@ static int find_group_dir(struct super_block *sb, struct inode *parent)
226 return best_group; 226 return best_group;
227} 227}
228 228
229/* 229/*
230 * Orlov's allocator for directories. 230 * Orlov's allocator for directories.
231 * 231 *
232 * We always try to spread first-level directories. 232 * We always try to spread first-level directories.
233 * 233 *
234 * If there are blockgroups with both free inodes and free blocks counts 234 * If there are blockgroups with both free inodes and free blocks counts
235 * not worse than average we return one with smallest directory count. 235 * not worse than average we return one with smallest directory count.
236 * Otherwise we simply return a random group. 236 * Otherwise we simply return a random group.
237 * 237 *
238 * For the rest rules look so: 238 * For the rest rules look so:
239 * 239 *
240 * It's OK to put directory into a group unless 240 * It's OK to put directory into a group unless
241 * it has too many directories already (max_dirs) or 241 * it has too many directories already (max_dirs) or
242 * it has too few free inodes left (min_inodes) or 242 * it has too few free inodes left (min_inodes) or
243 * it has too few free blocks left (min_blocks) or 243 * it has too few free blocks left (min_blocks) or
244 * it's already running too large debt (max_debt). 244 * it's already running too large debt (max_debt).
245 * Parent's group is prefered, if it doesn't satisfy these 245 * Parent's group is prefered, if it doesn't satisfy these
246 * conditions we search cyclically through the rest. If none 246 * conditions we search cyclically through the rest. If none
247 * of the groups look good we just look for a group with more 247 * of the groups look good we just look for a group with more
248 * free inodes than average (starting at parent's group). 248 * free inodes than average (starting at parent's group).
249 * 249 *
250 * Debt is incremented each time we allocate a directory and decremented 250 * Debt is incremented each time we allocate a directory and decremented
251 * when we allocate an inode, within 0--255. 251 * when we allocate an inode, within 0--255.
252 */ 252 */
253 253
254#define INODE_COST 64 254#define INODE_COST 64
255#define BLOCK_COST 256 255#define BLOCK_COST 256
@@ -454,7 +454,7 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode)
454 group = find_group_dir(sb, dir); 454 group = find_group_dir(sb, dir);
455 else 455 else
456 group = find_group_orlov(sb, dir); 456 group = find_group_orlov(sb, dir);
457 } else 457 } else
458 group = find_group_other(sb, dir); 458 group = find_group_other(sb, dir);
459 459
460 err = -ENOSPC; 460 err = -ENOSPC;