summaryrefslogtreecommitdiff
path: root/fs/logfs/gc.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-05-14 13:29:52 (GMT)
committerSteven Rostedt <rostedt@goodmis.org>2010-05-14 13:29:52 (GMT)
commit23e117fa44429cc054cb27d5621d64e4ced91e52 (patch)
treea4b9d0902b9c6f009b2c297515221c1b9bed3af8 /fs/logfs/gc.c
parent668eb65f092902eb7dd526af73d4a7f025a94612 (diff)
parenta93d2f1744206827ccf416e2cdc5018aa503314e (diff)
downloadlinux-23e117fa44429cc054cb27d5621d64e4ced91e52.tar.xz
Merge branch 'sched/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into trace/tip/tracing/core-4
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 84e36f5..76c242f 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)
struct logfs_block *block;
int round, progress, last_progress = 0;
+ /*
+ * Doing too many changes to the segfile at once would result
+ * in a large number of aliases. Write the journal before
+ * things get out of hand.
+ */
+ if (super->s_shadow_tree.no_shadowed_segments >= MAX_OBJ_ALIASES)
+ logfs_write_anchor(sb);
+
if (no_free_segments(sb) >= target &&
super->s_no_object_aliases < MAX_OBJ_ALIASES)
return;