Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1013607pxb; Thu, 9 Sep 2021 18:01:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4AcVZO2LdJThNmNcDvV4C5e6Ih506hNbk4kcfCxWXZ7ZvTmnn0e1XKms6Xaj0zbCeP26v X-Received: by 2002:a17:906:c9c2:: with SMTP id hk2mr6614219ejb.328.1631235667361; Thu, 09 Sep 2021 18:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235667; cv=none; d=google.com; s=arc-20160816; b=lZA5beMzWPARX4N6bxB70espOH5bqm+mhwS6zvZcyqNeIhuy68f1mPrFfKfTgDky7U BbCcwzDExyvDAY+Buwke1c97vJQrm3ZXiNSC2LJKXL0bCv72cZvsr4zoNMibvhvkLSRh 1WDlutSomMNFm1D/aYZvZy9lzn07yKu2OodYg1BxdkyIxtpfBjHvT1mextdLn+FD7PR3 Hhaknh98SQygVP7Zn5kBlBJubXPg5VndTsWBwfdzej7j3BFEgC/eczZD0cAXI+MZXZSU PbCHs8QctyxIDNAqNiAEwPvmC2iS3BypTRkXOotDdW+XTtT2cb6isb6o7x+mflxodmZC RyLQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C7BS6InU2OecS4CY+QXX7pIGKW4dPL5XGonXLSlV3qQ=; b=nhN9ZQcmFbVai2J7gVruqMpd3xPT0tXg4d0aTh7kgrscqETEpF0f66tTA62yaFEfRu gesEOAtYC8fEsMkZsmzkcdPLtobwyRH0Nor3irYAW7zhqUuyUsJYpPtnCWbShr2UwnWJ IKo1+bu8//AUwvM93pDtGmVinnwVQazfpNIHgswTCf1RbgtjqcgYcs/RBjV/YhZsqEyl L//oGerC8Jd/GRr1gd80YGThIb74p006phhAK9kNd8I3NjRWXXDqok3Q6fEnZqPdJDWt 8BXLMMiPNC36Q2I7OYtkj6czrK8DlcCVX7IXbyc2zd/jcH4MzVrppBuvsjVw68gmxjmY ApVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijpCvUtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp8si3582531ejc.107.2021.09.09.18.00.42; Thu, 09 Sep 2021 18:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijpCvUtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243396AbhIJA7O (ORCPT + 99 others); Thu, 9 Sep 2021 20:59:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:48548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234173AbhIJAW7 (ORCPT ); Thu, 9 Sep 2021 20:22:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 497AB60FDA; Fri, 10 Sep 2021 00:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233309; bh=n/v+KpbYLzu6XxAJStKkikqPZU9/FjMVaU997xlo8DE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ijpCvUtMrs5tgZq03MICO2EIdypY6YpRxCIsKyF7c2ALemgVrS0+xbEX3s4x2EDIS rka+nME+3X6SkC8hSQMLYybm7Ab1t4aXKi4IO+K8cZsovvn0WlNAHRlZkrkmK9RW0g lVPY3joUeNX/XZ3oE6hl6j6eHCw/AilQC9Ku5PRgi7l4yrwYB4dk6826FlyNvIGcSt 6Fkg3audB2hSRKQsqnUztc4xcmHGDEDm8o7iEE0H145JP29NHq+AReWjhaxIRtAQae VwAs4i36KveGgCmo7gReyvJH/7OdnAFJsfJ2ohh+zfgROFOBpvdVi7BNenw1opIaKp RxGHxOcpIlVcw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jia Yang , Chao Yu , Jaegeuk Kim , Sasha Levin , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 5.4 04/37] f2fs: Revert "f2fs: Fix indefinite loop in f2fs_gc() v1" Date: Thu, 9 Sep 2021 20:21:09 -0400 Message-Id: <20210910002143.175731-4-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia Yang [ Upstream commit 10d0786b39b3b91c4fbf8c2926e97ab456a4eea1 ] This reverts commit 957fa47823dfe449c5a15a944e4e7a299a6601db. The patch "f2fs: Fix indefinite loop in f2fs_gc()" v1 and v4 are all merged. Patch v4 is test info for patch v1. Patch v1 doesn't work and may cause that sbi->cur_victim_sec can't be resetted to NULL_SEGNO, which makes SSR unable to get segment of sbi->cur_victim_sec. So it should be reverted. The mails record: [1] https://lore.kernel.org/linux-f2fs-devel/7288dcd4-b168-7656-d1af-7e2cafa4f720@huawei.com/T/ [2] https://lore.kernel.org/linux-f2fs-devel/20190809153653.GD93481@jaegeuk-macbookpro.roam.corp.google.com/T/ Signed-off-by: Jia Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index a78aa5480454..67e2b0de1ef4 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1332,7 +1332,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, round++; } - if (gc_type == FG_GC && seg_freed) + if (gc_type == FG_GC) sbi->cur_victim_sec = NULL_SEGNO; if (sync) -- 2.30.2