[PATCH] f2fs: adjust unusable cap before checkpoint=disable mode

Daeho Jeong posted 1 patch 2 days, 21 hours ago
fs/f2fs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] f2fs: adjust unusable cap before checkpoint=disable mode
Posted by Daeho Jeong 2 days, 21 hours ago
From: Daeho Jeong <daehojeong@google.com>

The unusable cap value must be adjusted before checking whether
checkpoint=disable is feasible.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 87ab5696bd48..da85e3c47698 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2474,6 +2474,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 		}
 	}
 
+	adjust_unusable_cap_perc(sbi);
 	if (enable_checkpoint == !!test_opt(sbi, DISABLE_CHECKPOINT)) {
 		if (test_opt(sbi, DISABLE_CHECKPOINT)) {
 			err = f2fs_disable_checkpoint(sbi);
@@ -2518,7 +2519,6 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 		(test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
 
 	limit_reserve_root(sbi);
-	adjust_unusable_cap_perc(sbi);
 	*flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME);
 	return 0;
 restore_checkpoint:
-- 
2.47.0.338.g60cca15819-goog
Re: [f2fs-dev] [PATCH] f2fs: adjust unusable cap before checkpoint=disable mode
Posted by Chao Yu 2 days, 14 hours ago
On 2024/11/19 2:45, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> The unusable cap value must be adjusted before checking whether
> checkpoint=disable is feasible.
> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,