aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/gc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-21 15:31:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-21 15:31:12 -0400
commit255f41c59558a346d65a2012420a7573e36dc584 (patch)
treea802e21e60c7e342ad72319853b64e214091b6a9 /fs/logfs/gc.c
parent9befb55ef51ad69dd67e279b0533d4cbc5e4c6c0 (diff)
parentb6349ac89eacb813f6963f7263da05bc3f483351 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs
* git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs: [LogFS] Split large truncated into smaller chunks [LogFS] Set s_bdi [LogFS] Prevent mempool_destroy NULL pointer dereference [LogFS] Move assertion [LogFS] Plug 8 byte information leak [LogFS] Prevent memory corruption on large deletes [LogFS] Remove unused method Fix trivial conflict with added header includes in fs/logfs/super.c
Diffstat (limited to 'fs/logfs/gc.c')
-rw-r--r--fs/logfs/gc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/logfs/gc.c b/fs/logfs/gc.c
index 84e36f52fe95..76c242fbe1b0 100644
--- a/fs/logfs/gc.c
+++ b/fs/logfs/gc.c
@@ -459,6 +459,14 @@ static void __logfs_gc_pass(struct super_block *sb, int target)
459 struct logfs_block *block; 459 struct logfs_block *block;
460 int round, progress, last_progress = 0; 460 int round, progress, last_progress = 0;
461 461
462 /*
463 * Doing too many changes to the segfile at once would result
464 * in a large number of aliases. Write the journal before
465 * things get out of hand.
466 */
467 if (super->s_shadow_tree.no_shadowed_segments >= MAX_OBJ_ALIASES)
468 logfs_write_anchor(sb);
469
462 if (no_free_segments(sb) >= target && 470 if (no_free_segments(sb) >= target &&
463 super->s_no_object_aliases < MAX_OBJ_ALIASES) 471 super->s_no_object_aliases < MAX_OBJ_ALIASES)
464 return; 472 return;