f2fs: guarantee to write dirty data when enabling checkpoint back
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 19 Aug 2021 21:00:57 +0000 (14:00 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 30 Aug 2021 17:12:47 +0000 (10:12 -0700)
commitdddd3d65293a52c2c3850c19b1e5115712e534d8
treedfbcce98983e1e41ed25cee8365056fe6112df5a
parentc8dc3047c48540183744f959412d44b08c5435e1
f2fs: guarantee to write dirty data when enabling checkpoint back

We must flush all the dirty data when enabling checkpoint back. Let's guarantee
that first by adding a retry logic on sync_inodes_sb(). In addition to that,
this patch adds to flush data in fsync when checkpoint is disabled, which can
mitigate the sync_inodes_sb() failures in advance.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
fs/f2fs/super.c