Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp558670ybk; Fri, 15 May 2020 07:46:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOGgQ13snQbuByxRmfGEW6EY5hjMwZK+LoT8G0oaAxvaGUoFAfp95P1xuQMz4oFqPLAyGF X-Received: by 2002:a17:906:abce:: with SMTP id kq14mr2960321ejb.187.1589554018023; Fri, 15 May 2020 07:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589554018; cv=none; d=google.com; s=arc-20160816; b=TXz9yiWgjF0f1sH5kXly7Jr2Lkw72S/A8q2zqwVYSRMsPnoZ3IY3BZmAKhc08SHBOq 1H4dgf4n0IrHhDiXrZQ1+XhjIOkuzEOgNUdxqHAm0E+ysrpM+3APJ07Vet1eBZiXyoac NRrWjhYGVf7YVHwSRTjt9lu+CByZVbogG+sxFyCvnHL3REUHxB6bQnv8IaERUVGTXdT1 UEcozNDLwYNGIQ7AeQQ1utMntINn1obnzyenyNUZmPdA+cjNCtqlvRBb1gi3GsIm2P4m supL+RWbqNPDxnyQhboNE34iG13QowWcGzUj4A6rfc1Hp30DahMJpt5kS4PJ82nOzuxC WIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZuLKfa1i0o4pX+jejinnEWf/074esPkh6gLMlbRgmFg=; b=B9Ag/Mqw7BH8tJk+MMzrdi17A64ipkHMDAFcMMw4TQlGbbKwJzMHN8nd4QrMS32JKQ SxIDyoS7WzjSBHyqwcgAVEPkByobrSmST0zqlLvbEzdNLPHBWZ3+1hYlppVMf0GBc0XM SBOjuCPPryiRYBh+rXxbP/nequ5l4qbHT9Nh+pup7SgNOhpQide7zCDKZD8rt93KQwNE 53ybDNMY4qxhO7H67PodZdfDVJsrxZxESLCfnbakNnjKLv1HkwUZvP8sV2rvrTs0pH4i GhG7yIvmPFg12XgID2AwcQri9CaRAUKcRmc3Dl7TLE+9I9waH2CJifTZsCcrVYH4EpMc hQcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OlAW9ahg; 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 c2si1309798edm.499.2020.05.15.07.46.34; Fri, 15 May 2020 07:46:58 -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=default header.b=OlAW9ahg; 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 S1726290AbgEOOpK (ORCPT + 99 others); Fri, 15 May 2020 10:45:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:60470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbgEOOpK (ORCPT ); Fri, 15 May 2020 10:45:10 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B5F4320671; Fri, 15 May 2020 14:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589553909; bh=11QCz4wj0IRYOsP8TSzEDA1ar1cIM8puU3El5/WrkVs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OlAW9ahgqgxfR8cXxImDaOO46Cnzdv4vh2+mbxjE0y3uKG1qx3xRCPMMS8HG7NDh5 tkFYpwUohUuIUa1bP+R9mvELw7n4OMAfJM/hA4bgvqyII4yEi5SE3BeQv/JBw20yf0 KOpRb93VlfcGn9OzGvNVWjSgbBApluGmHdFqCPWM= Date: Fri, 15 May 2020 07:45:09 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Subject: Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them Message-ID: <20200515144509.GA46028@google.com> References: <20200515021554.226835-1-jaegeuk@kernel.org> <9ba6e5ef-068d-a925-1eb9-107b0523666c@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ba6e5ef-068d-a925-1eb9-107b0523666c@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/15, Chao Yu wrote: > On 2020/5/15 10:15, Jaegeuk Kim wrote: > > Let's guarantee flusing dirty meta pages to avoid infinite loop. > > What's the root cause? Race case or meta page flush failure? Investigating, but at least, this can avoid the inifinite loop there. V2: From c60ce8e7178004fd6cba96e592247e43b5fd98d8 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 13 May 2020 21:12:53 -0700 Subject: [PATCH] f2fs: flush dirty meta pages when flushing them Let's guarantee flusing dirty meta pages to avoid infinite loop. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 620a386d82c1a..3dc3ac6fe1432 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1266,6 +1266,9 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type) if (unlikely(f2fs_cp_error(sbi))) break; + if (type == F2FS_DIRTY_META) + f2fs_sync_meta_pages(sbi, META, LONG_MAX, + FS_CP_META_IO); io_schedule_timeout(DEFAULT_IO_TIMEOUT); } finish_wait(&sbi->cp_wait, &wait); -- 2.26.2.761.g0e0b3e54be-goog