From nobody Tue Dec 16 11:42:51 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F322C28B2B for ; Fri, 19 Aug 2022 16:37:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353406AbiHSQhZ (ORCPT ); Fri, 19 Aug 2022 12:37:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353733AbiHSQcb (ORCPT ); Fri, 19 Aug 2022 12:32:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95C0C104751; Fri, 19 Aug 2022 09:06:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0DAF961847; Fri, 19 Aug 2022 16:06:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBC4CC43161; Fri, 19 Aug 2022 16:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925206; bh=U6Oj1s2R8cOjNxTn9ka/dfLIH7yzONLQZlCxp750dFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T14kkZz+D2oxe14bFMtXBGHMPrNMjxm1ljuCysbOOS1tBXnJKzOC0OFytLxxTeyN0 2peG3/HOWCyGBfZxrIXRd1DOfgfZweJJFQb8m1qAwSto9zOTtmI9BIPYfwCi8EaNbp rRmDLXL+Yj/sVSO2SzfgRNQygeFo9W2KTnwSbeA8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.10 418/545] f2fs: dont set GC_FAILURE_PIN for background GC Date: Fri, 19 Aug 2022 17:43:08 +0200 Message-Id: <20220819153848.137578820@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chao Yu [ 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 Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- 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 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, } =20 if (f2fs_is_pinned_file(inode)) { - f2fs_pin_file_control(inode, true); + if (gc_type =3D=3D FG_GC) + f2fs_pin_file_control(inode, true); err =3D -EAGAIN; goto out; } --=20 2.35.1