aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index d7947d90ccc3..943a31db7cc3 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -58,7 +58,7 @@ static int gc_thread_func(void *data)
58 * 3. IO subsystem is idle by checking the # of requests in 58 * 3. IO subsystem is idle by checking the # of requests in
59 * bdev's request list. 59 * bdev's request list.
60 * 60 *
61 * Note) We have to avoid triggering GCs too much frequently. 61 * Note) We have to avoid triggering GCs frequently.
62 * Because it is possible that some segments can be 62 * Because it is possible that some segments can be
63 * invalidated soon after by user update or deletion. 63 * invalidated soon after by user update or deletion.
64 * So, I'd like to wait some time to collect dirty segments. 64 * So, I'd like to wait some time to collect dirty segments.
@@ -222,7 +222,7 @@ static unsigned int get_cb_cost(struct f2fs_sb_info *sbi, unsigned int segno)
222 222
223 u = (vblocks * 100) >> sbi->log_blocks_per_seg; 223 u = (vblocks * 100) >> sbi->log_blocks_per_seg;
224 224
225 /* Handle if the system time is changed by user */ 225 /* Handle if the system time has changed by the user */
226 if (mtime < sit_i->min_mtime) 226 if (mtime < sit_i->min_mtime)
227 sit_i->min_mtime = mtime; 227 sit_i->min_mtime = mtime;
228 if (mtime > sit_i->max_mtime) 228 if (mtime > sit_i->max_mtime)
@@ -593,7 +593,7 @@ next_step:
593 593
594 if (phase == 2) { 594 if (phase == 2) {
595 inode = f2fs_iget(sb, dni.ino); 595 inode = f2fs_iget(sb, dni.ino);
596 if (IS_ERR(inode)) 596 if (IS_ERR(inode) || is_bad_inode(inode))
597 continue; 597 continue;
598 598
599 start_bidx = start_bidx_of_node(nofs, F2FS_I(inode)); 599 start_bidx = start_bidx_of_node(nofs, F2FS_I(inode));
@@ -693,7 +693,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi)
693gc_more: 693gc_more:
694 if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE))) 694 if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE)))
695 goto stop; 695 goto stop;
696 if (unlikely(is_set_ckpt_flags(F2FS_CKPT(sbi), CP_ERROR_FLAG))) 696 if (unlikely(f2fs_cp_error(sbi)))
697 goto stop; 697 goto stop;
698 698
699 if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) { 699 if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) {