aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/gc.c
diff options
context:
space:
mode:
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 92949f95a901..e8253e7fb6b2 100644
--- a/fs/logfs/gc.c
+++ b/fs/logfs/gc.c
@@ -458,6 +458,14 @@ static void __logfs_gc_pass(struct super_block *sb, int target)
458 struct logfs_block *block; 458 struct logfs_block *block;
459 int round, progress, last_progress = 0; 459 int round, progress, last_progress = 0;
460 460
461 /*
462 * Doing too many changes to the segfile at once would result
463 * in a large number of aliases. Write the journal before
464 * things get out of hand.
465 */
466 if (super->s_shadow_tree.no_shadowed_segments >= MAX_OBJ_ALIASES)
467 logfs_write_anchor(sb);
468
461 if (no_free_segments(sb) >= target && 469 if (no_free_segments(sb) >= target &&
462 super->s_no_object_aliases < MAX_OBJ_ALIASES) 470 super->s_no_object_aliases < MAX_OBJ_ALIASES)
463 return; 471 return;