diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-05-26 18:03:34 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 11:31:52 -0700 |
commit | 64c74a7ab505ea40d1b3e5d02735ecab08ae1b14 (patch) | |
tree | 82704aa77f4a38e67e54ab2661e0bfa5bd92a807 /fs/f2fs/segment.c | |
parent | 35a9a766a1b3d57b5f84356954c443db62311b68 (diff) | |
download | op-kernel-dev-64c74a7ab505ea40d1b3e5d02735ecab08ae1b14.zip op-kernel-dev-64c74a7ab505ea40d1b3e5d02735ecab08ae1b14.tar.gz |
f2fs: fix to don't trigger writeback during recovery
- f2fs_fill_super
- recover_fsync_data
- recover_data
- del_fsync_inode
- iput
- iput_final
- write_inode_now
- f2fs_write_inode
- f2fs_balance_fs
- f2fs_balance_fs_bg
- sync_dirty_inodes
With data_flush mount option, during recovery, in order to avoid entering
above writeback flow, let's detect recovery status and do skip in
f2fs_balance_fs_bg.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index bfbf666..7208978 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -486,6 +486,9 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need) void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi) { + if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) + return; + /* try to shrink extent cache when there is no enough memory */ if (!available_free_memory(sbi, EXTENT_CACHE)) f2fs_shrink_extent_tree(sbi, EXTENT_CACHE_SHRINK_NUMBER); |