Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3125243rwb; Mon, 15 Aug 2022 18:45:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR51DzVnAsZGPuoOlbmsUmlmWAfLdfzXlnl/c09jDLWqLf+tIOFRkAJgQAM2XRomdMhtbP5S X-Received: by 2002:a05:6402:2b88:b0:43a:6c58:6c64 with SMTP id fj8-20020a0564022b8800b0043a6c586c64mr16934571edb.348.1660614327825; Mon, 15 Aug 2022 18:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660614327; cv=none; d=google.com; s=arc-20160816; b=sVnKWIi9rC5Gj944s7joLZw9ba7kSjL7Ul/LZxhXaA2Aox2E0keXXjQVjGO5AK40Km yzcO4Zqscu5afvOj1Ms4ZOaFiqyVaTkoN8q71mr1QcafOmYW6R71Fc+X3gLVfp0dBzBf 0NCi1xVnHfM612jHkFHOuCS+DG/WXZO/HsQj8junJoL8Ze90rDVk3+XWLTPfDJTyWjBF 3bWNfhY3Ie1vV4Z4jSIgT85TM4pcbowntGN1qAvatO/CoKHd+03owsD3L8CZaxgtVVKJ 4LGM5IDk1Xjt9q6fDEq/BY/RVdoFM19hqkg2k2HTBrqWaDYO734WQZCJ9Cy9BgOLcKm2 +cmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vTiuKhMcRM7lSBW+OlIlN3FEGuogJERSPLj/iCy9w7k=; b=g1ZU1O86hCilSda8k/udQee9nNurChZsbA0HIukI0zU6HT1WaAJyVbdWfiBrIwx2lH f0lR7J/8NhquW8klDVlAwJQZe5IfvZMbhCpGms5AIxNfaOH2TdvLeXa+KSQnxH3klVzw ny2gG+iLH16NqrFk0q8ajMiFJC9bJiGsO9U1/WCJXDkLON3NQFxCna9NtcMuwhDeKewn GyrceGY4qGdOXzwY1j86RKmEfPFUoCXEUIeEDAZcRqelo9FHaHJX0gqCiqIOyqSNreK1 eri+esnrs2oHjIj75/gcqqoTkZtz35hjgEVW7A8nALRZKbWZoVkVI2XnAgQmp17619if ViBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vk0A/CwQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy24-20020a170906b7d800b0072af35fca64si7560114ejb.484.2022.08.15.18.45.02; Mon, 15 Aug 2022 18:45:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vk0A/CwQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352350AbiHOW5e (ORCPT + 99 others); Mon, 15 Aug 2022 18:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352359AbiHOWzi (ORCPT ); Mon, 15 Aug 2022 18:55:38 -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 3E8CC261E; Mon, 15 Aug 2022 12:55:16 -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 C337561178; Mon, 15 Aug 2022 19:55:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE486C433D6; Mon, 15 Aug 2022 19:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593315; bh=P5OullaDC/JY0jpGOHyzfuITkSwrD2srDkMM99RXN/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vk0A/CwQ3/LOJ73fqyR/tRZv1ZveqgATrJ2218l3LdQ7JGZnfZMb+PbVTDzw01U76 JMpgJdeKLVHN4IdKB6IXv8SZtyXuEIqL7FGnGKUnEdgt/wwQOErqK0B3Kn/2Kit8pJ ZZrr+C9OzYEVBsLh1JG5REEz2cu0wG7i1lXkw3VE= 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.18 0928/1095] f2fs: dont set GC_FAILURE_PIN for background GC Date: Mon, 15 Aug 2022 20:05:27 +0200 Message-Id: <20220815180507.633833003@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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