From b2c95f8a6579f123c0a61baa4456fdcc738c1f75 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 5 Feb 2013 13:19:28 +0900 Subject: [PATCH] --- yaml --- r: 358998 b: refs/heads/master c: b7250d2d845822466356f7f22a650bf807090d7e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/f2fs/gc.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8285c2707b6f..436a182f0c50 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 437275272f9e635673f065300e5d95226a25cb06 +refs/heads/master: b7250d2d845822466356f7f22a650bf807090d7e diff --git a/trunk/fs/f2fs/gc.c b/trunk/fs/f2fs/gc.c index 52d3a391b922..94b8a0c48453 100644 --- a/trunk/fs/f2fs/gc.c +++ b/trunk/fs/f2fs/gc.c @@ -146,6 +146,9 @@ static void select_policy(struct f2fs_sb_info *sbi, int gc_type, static unsigned int get_max_cost(struct f2fs_sb_info *sbi, struct victim_sel_policy *p) { + /* SSR allocates in a segment unit */ + if (p->alloc_mode == SSR) + return 1 << sbi->log_blocks_per_seg; if (p->gc_mode == GC_GREEDY) return (1 << sbi->log_blocks_per_seg) * p->ofs_unit; else if (p->gc_mode == GC_CB)