summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorJaegeuk Kim2015-01-29 20:45:33 +0100
committerJaegeuk Kim2015-02-12 02:04:41 +0100
commit119ee9144534141822462e3e8a5ccc8dc537f712 (patch)
treed1db8598f68e80459d40343d70883a62606de7d5 /fs/f2fs/gc.c
parentf2fs: avoid write_checkpoint if f2fs is mounted readonly (diff)
downloadkernel-qcow2-linux-119ee9144534141822462e3e8a5ccc8dc537f712.tar.gz
kernel-qcow2-linux-119ee9144534141822462e3e8a5ccc8dc537f712.tar.xz
kernel-qcow2-linux-119ee9144534141822462e3e8a5ccc8dc537f712.zip
f2fs: split UMOUNT and FASTBOOT flags
This patch adds FASTBOOT flag into checkpoint as follows. - CP_UMOUNT_FLAG is set when system is umounted. - CP_FASTBOOT_FLAG is set when intermediate checkpoint having node summaries was done. So, if you get CP_UMOUNT_FLAG from checkpoint, the system was umounted cleanly. Instead, if there was sudden-power-off, you can get CP_FASTBOOT_FLAG or nothing. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index ba89e27f394f..76adbc3641f1 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -698,8 +698,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi)
.iroot = RADIX_TREE_INIT(GFP_NOFS),
};
- cpc.reason = test_opt(sbi, FASTBOOT) ? CP_UMOUNT : CP_SYNC;
-
+ cpc.reason = __get_cp_reason(sbi);
gc_more:
if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE)))
goto stop;