diff options
author | Chao Yu <chao@kernel.org> | 2022-03-20 18:11:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-21 16:16:11 +0300 |
commit | d0311057395b6bc8eed0157dbd75157758f55a04 (patch) | |
tree | f53819cdbc800056abb3a86dca89fa494502813f /fs | |
parent | 47a8fe1b154aa6d836582365b1c70684af8597e4 (diff) | |
download | linux-d0311057395b6bc8eed0157dbd75157758f55a04.tar.xz |
f2fs: don't set GC_FAILURE_PIN for background GC
[ Upstream commit 642c0969916eaa4878cb74f36752108e590b0389 ]
So that it can reduce the possibility that file be unpinned forcely by
foreground GC due to .i_gc_failures[GC_FAILURE_PIN] exceeds threshold.
Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 24e93fb254c5..22bb5e07f656 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1158,7 +1158,8 @@ static int move_data_block(struct inode *inode, block_t bidx, } if (f2fs_is_pinned_file(inode)) { - f2fs_pin_file_control(inode, true); + if (gc_type == FG_GC) + f2fs_pin_file_control(inode, true); err = -EAGAIN; goto out; } |