f2fs: fix to set ipu policy
authorYangtao Li <frank.li@vivo.com>
Mon, 6 Feb 2023 14:43:08 +0000 (22:43 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 7 Feb 2023 18:45:00 +0000 (10:45 -0800)
commitc5bf83483382600988d7db5ffe9fcd1936b491fd
treef47d59fe5ffb213b80a2a652fca538286e2078f7
parent146949defda868378992171b9e42318b06fcd482
f2fs: fix to set ipu policy

For LFS mode, it should update outplace and no need inplace update.
When using LFS mode for small-volume devices, IPU will not be used,
and the OPU writing method is actually used, but F2FS_IPU_FORCE can
be read from the ipu_policy node, which is different from the actual
situation. And remount to lfs mode should be disallowed when
f2fs ipu is enabled, let's fix it.

Fixes: 84b89e5d943d ("f2fs: add auto tuning for small devices")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.h
fs/f2fs/super.c
fs/f2fs/sysfs.c