diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 11:59:37 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 14:20:42 +0200 | 
| commit | dbb6be6d5e974c42bbecd183effaa0df69e1dd8b (patch) | |
| tree | 5735cb47e70853d057a9881dd0ce44b83e88fa63 /fs/logfs/gc.c | |
| parent | 6a867a395558a7f882d041783e4cdea6744ca2bf (diff) | |
| parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) | |
| download | olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.tar.xz olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.zip  | |
Merge branch 'linus' into timers/core
Reason: Further posix_cpu_timer patches depend on mainline changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/logfs/gc.c')
| -rw-r--r-- | fs/logfs/gc.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/logfs/gc.c b/fs/logfs/gc.c index 92949f95a90..76c242fbe1b 100644 --- a/fs/logfs/gc.c +++ b/fs/logfs/gc.c @@ -7,6 +7,7 @@   */  #include "logfs.h"  #include <linux/sched.h> +#include <linux/slab.h>  /*   * Wear leveling needs to kick in when the difference between low erase @@ -458,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;  |