aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-02-04 01:11:17 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-02-11 17:15:02 -0500
commit437275272f9e635673f065300e5d95226a25cb06 (patch)
treebb0b8945d70971c200d098106b8879c1f84e109a /fs/f2fs/super.c
parentb1f1daf8c72d615b64163e26488d8effeed29b60 (diff)
f2fs: clarify and enhance the f2fs_gc flow
This patch makes clearer the ambiguous f2fs_gc flow as follows. 1. Remove intermediate checkpoint condition during f2fs_gc (i.e., should_do_checkpoint() and GC_BLOCKED) 2. Remove unnecessary return values of f2fs_gc because of #1. (i.e., GC_NODE, GC_OK, etc) 3. Simplify write_checkpoint() because of #2. 4. Clarify the main f2fs_gc flow. o monitor how many freed sections during one iteration of do_garbage_collect(). o do GC more without checkpoints if we can't get enough free sections. o do checkpoint once we've got enough free sections through forground GCs. 5. Adopt thread-logging (Slack-Space-Recycle) scheme more aggressively on data log types. See. get_ssr_segement() Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index ddb665f54d17..8c117649a035 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -112,7 +112,7 @@ static void f2fs_put_super(struct super_block *sb)
112 f2fs_destroy_stats(sbi); 112 f2fs_destroy_stats(sbi);
113 stop_gc_thread(sbi); 113 stop_gc_thread(sbi);
114 114
115 write_checkpoint(sbi, false, true); 115 write_checkpoint(sbi, true);
116 116
117 iput(sbi->node_inode); 117 iput(sbi->node_inode);
118 iput(sbi->meta_inode); 118 iput(sbi->meta_inode);
@@ -136,7 +136,7 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
136 return 0; 136 return 0;
137 137
138 if (sync) 138 if (sync)
139 write_checkpoint(sbi, false, false); 139 write_checkpoint(sbi, false);
140 else 140 else
141 f2fs_balance_fs(sbi); 141 f2fs_balance_fs(sbi);
142 142