f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 5 Feb 2019 15:59:57 +0000 (07:59 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 6 Mar 2019 03:58:06 +0000 (19:58 -0800)
If we met this once, let fsck.f2fs clear this only.
Note that, this addresses all the subtle fault injection test.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c

index 03fea4e..c65a1e8 100644 (file)
@@ -1267,8 +1267,10 @@ static void update_ckpt_flags(struct f2fs_sb_info *sbi, struct cp_control *cpc)
 
        if (is_sbi_flag_set(sbi, SBI_QUOTA_SKIP_FLUSH))
                __set_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG);
-       else
-               __clear_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG);
+       /*
+        * TODO: we count on fsck.f2fs to clear this flag until we figure out
+        * missing cases which clear it incorrectly.
+        */
 
        if (is_sbi_flag_set(sbi, SBI_QUOTA_NEED_REPAIR))
                __set_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG);