Skip to content

Commit

Permalink
f2fs: don't set GC_FAILURE_PIN for background GC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chao Yu authored and Jaegeuk Kim committed Apr 25, 2022
1 parent a22bb55 commit 642c096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/f2fs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,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;
}
Expand Down

0 comments on commit 642c096

Please sign in to comment.