f2fs: introduce cp_control structure
[deliverable/linux.git] / fs / f2fs / gc.c
index 7bf8392d555f3e2abd08d001151e7a502087367a..e88fcf65aa7fff09d9993d6c5e6dee1b6d5c918a 100644 (file)
@@ -694,6 +694,9 @@ int f2fs_gc(struct f2fs_sb_info *sbi)
        int gc_type = BG_GC;
        int nfree = 0;
        int ret = -1;
+       struct cp_control cpc = {
+               .reason = CP_SYNC,
+       };
 
        INIT_LIST_HEAD(&ilist);
 gc_more:
@@ -704,7 +707,7 @@ gc_more:
 
        if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) {
                gc_type = FG_GC;
-               write_checkpoint(sbi, false);
+               write_checkpoint(sbi, &cpc);
        }
 
        if (!__get_victim(sbi, &segno, gc_type, NO_CHECK_TYPE))
@@ -729,7 +732,7 @@ gc_more:
                goto gc_more;
 
        if (gc_type == FG_GC)
-               write_checkpoint(sbi, false);
+               write_checkpoint(sbi, &cpc);
 stop:
        mutex_unlock(&sbi->gc_mutex);
 
This page took 0.029685 seconds and 5 git commands to generate.