lkml.org 
[lkml]   [2022]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.18 0928/1095] f2fs: dont set GC_FAILURE_PIN for background GC
    Date
    From: Chao Yu <chao@kernel.org>

    [ 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>
    ---
    fs/f2fs/gc.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
    index e83c07144d8f..6a7e4148ff9d 100644
    --- a/fs/f2fs/gc.c
    +++ b/fs/f2fs/gc.c
    @@ -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;
    }
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-08-16 00:57    [W:2.405 / U:0.772 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site