Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

f2fs: fix to clear unusable_cap for checkpoint=enable

mount -t f2fs -o checkpoint=disable:10% /dev/vdb /mnt/f2fs/
mount -t f2fs -o remount,checkpoint=enable /dev/vdb /mnt/f2fs/

kernel log:
F2FS-fs (vdb): Adjust unusable cap for checkpoint=disable = 204440 / 10%

If we has assigned checkpoint=enable mount option, unusable_cap{,_perc}
parameters of checkpoint=disable should be reset, then calculation and
log print could be avoid in adjust_unusable_cap_perc().

Fixes: 1ae18f71cb52 ("f2fs: fix checkpoint=disable:%u%%")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
2e8f4c2b cbba5038

+4
+4
fs/f2fs/super.c
··· 998 998 ctx_set_opt(ctx, F2FS_MOUNT_DISABLE_CHECKPOINT); 999 999 break; 1000 1000 case Opt_checkpoint_enable: 1001 + F2FS_CTX_INFO(ctx).unusable_cap_perc = 0; 1002 + ctx->spec_mask |= F2FS_SPEC_checkpoint_disable_cap_perc; 1003 + F2FS_CTX_INFO(ctx).unusable_cap = 0; 1004 + ctx->spec_mask |= F2FS_SPEC_checkpoint_disable_cap; 1001 1005 ctx_clear_opt(ctx, F2FS_MOUNT_DISABLE_CHECKPOINT); 1002 1006 break; 1003 1007 default: