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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
47a8fe1b15
commit
d031105739
@@ -1158,6 +1158,7 @@ static int move_data_block(struct inode *inode, block_t bidx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (f2fs_is_pinned_file(inode)) {
|
if (f2fs_is_pinned_file(inode)) {
|
||||||
|
if (gc_type == FG_GC)
|
||||||
f2fs_pin_file_control(inode, true);
|
f2fs_pin_file_control(inode, true);
|
||||||
err = -EAGAIN;
|
err = -EAGAIN;
|
||||||
goto out;
|
goto out;
|
||||||
|
Reference in New Issue
Block a user