]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/f2fs.h
f2fs: clean up bggc mount option
authorChao Yu <yuchao0@huawei.com>
Fri, 14 Feb 2020 09:44:13 +0000 (17:44 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 19 Mar 2020 18:41:25 +0000 (11:41 -0700)
commitbbbc34fd66625473d20f89def2703f4f140d2ce8
tree325ae11a365fc09224d5f3cfe71bc2d4c15aeeb5
parentb0332a0f957ca818642cfafdb9515d4fd3b24663
f2fs: clean up bggc mount option

There are three status for background gc: on, off and sync, it's
a little bit confused to use test_opt(BG_GC) and test_opt(FORCE_FG_GC)
combinations to indicate status of background gc.

So let's remove F2FS_MOUNT_BG_GC and F2FS_MOUNT_FORCE_FG_GC mount
options, and add F2FS_OPTION().bggc_mode with below three status
to clean up codes and enhance bggc mode's scalability.

enum {
BGGC_MODE_ON, /* background gc is on */
BGGC_MODE_OFF, /* background gc is off */
BGGC_MODE_SYNC, /*
 * background gc is on, migrating blocks
 * like foreground gc
 */
};

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