]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/f2fs-fix-to-don-t-trigger-writeback-during-recovery.patch
Remove duplicated commits
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / f2fs-fix-to-don-t-trigger-writeback-during-recovery.patch
1 From foo@baz Sat Jul 28 10:25:26 CEST 2018
2 From: Chao Yu <yuchao0@huawei.com>
3 Date: Sat, 26 May 2018 18:03:34 +0800
4 Subject: f2fs: fix to don't trigger writeback during recovery
5
6 From: Chao Yu <yuchao0@huawei.com>
7
8 [ Upstream commit 64c74a7ab505ea40d1b3e5d02735ecab08ae1b14 ]
9
10 - f2fs_fill_super
11 - recover_fsync_data
12 - recover_data
13 - del_fsync_inode
14 - iput
15 - iput_final
16 - write_inode_now
17 - f2fs_write_inode
18 - f2fs_balance_fs
19 - f2fs_balance_fs_bg
20 - sync_dirty_inodes
21
22 With data_flush mount option, during recovery, in order to avoid entering
23 above writeback flow, let's detect recovery status and do skip in
24 f2fs_balance_fs_bg.
25
26 Signed-off-by: Chao Yu <yuchao0@huawei.com>
27 Signed-off-by: Yunlei He <heyunlei@huawei.com>
28 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
29 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 ---
32 fs/f2fs/segment.c | 3 +++
33 1 file changed, 3 insertions(+)
34
35 --- a/fs/f2fs/segment.c
36 +++ b/fs/f2fs/segment.c
37 @@ -435,6 +435,9 @@ void f2fs_balance_fs(struct f2fs_sb_info
38
39 void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
40 {
41 + if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
42 + return;
43 +
44 /* try to shrink extent cache when there is no enough memory */
45 if (!available_free_memory(sbi, EXTENT_CACHE))
46 f2fs_shrink_extent_tree(sbi, EXTENT_CACHE_SHRINK_NUMBER);