f2fs: fix to account FS_CP_DATA_IO correctly
f2fs_inode_info.cp_task was introduced for FS_CP_DATA_IO accounting
since commit
500f43358294 ("f2fs: add app/fs io stat").
However, cp_task usage coverage has been increased due to below
commits:
commit
5e5464fd5e5f ("f2fs: fix to avoid deadloop if data_flush is on")
commit
7699d6c7a7b5 ("f2fs: fix potential recursive call when enabling data_flush")
So that, if data_flush mountoption is on, when data flush was
triggered from background, the IO from data flush will be accounted
as checkpoint IO type incorrectly.
In order to fix this issue, this patch splits cp_task into two:
a) cp_task: used for IO accounting
b) wb_task: used to avoid deadlock
Fixes: 5e5464fd5e5f ("f2fs: fix to avoid deadloop if data_flush is on")
Fixes: 7699d6c7a7b5 ("f2fs: fix potential recursive call when enabling data_flush")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>