f2fs: init discard policy after thread wakeup
authorYangtao Li <frank.li@vivo.com>
Fri, 18 Nov 2022 03:46:00 +0000 (11:46 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Nov 2022 20:50:19 +0000 (12:50 -0800)
commit48c08c51f938d955dd8f5b8972bc29faa4c9556f
treec39c030f05efa11f15c3a2cead1c14022e4251bb
parente219aecfd4b766c4e878a3769057e9809f7fcadc
f2fs: init discard policy after thread wakeup

Under the current logic, after the discard thread wakes up, it will not
run according to the expected policy, but will use the expected policy
before sleep. Move the strategy selection to after the thread wakes up,
so that the running state of the thread meets expectations.

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.c