Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2912357ybk; Mon, 18 May 2020 10:58:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrDgREyJiPPUjlYBbOV9HaNHoBOtfec6HO+Xg+EJ4AtJS0mf5DIiwp4tya3lem2VHrjwww X-Received: by 2002:a17:906:3041:: with SMTP id d1mr10434996ejd.7.1589824729562; Mon, 18 May 2020 10:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589824729; cv=none; d=google.com; s=arc-20160816; b=v4GbMdTvVySU7mfldKXge6dpbew6eEA3G8iuudCx2URCe3fOnXMcJ7ogL5rl/FooRJ AaJ92F6fe4DwhyPEJ69090l7TgckU+U5DTHM9wucG9yCWSDpWOssmKLczXx+MoSZd086 AmwyJ8j1GYM/u2VPnHGN/2sQ5Hd3HtKZSEeknZDhmLe05zuuqz4b7oCcLLgQyQAnIlLQ Y8n6SlTi7ifUMTykaIzHyDJw2BUK3JGGNzAp5ssZudnjY+Q8/XpHdktNlrfORsCW+Lbv ZTYoVJdKNf3v1W5cLlqROIhs6KhfwlM1xOF+lnpTnFYuKaKt7eFwI3Bt17ScfqyVm3RI cdlQ== 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=rik9AjREJ8Zw+GwFtnQnVJuu6aWcJW/PaAkQTnnqj6Q=; b=VDYdWLdq0g19fxY/54n19hKUHwJuhcsfSLJ+if/apskdflWhXanCJBLNviU575B4ht SurCxfPpXS6yYWAotQQcNqbTVKjVPtEPCD7LMo0bno29fqVMWxcGhPpNhhvbCEFvfoG7 viUJmyU2pczLcl2ozUMpAAGd1d1yvmzGaNYw4ACXwKnaPEgcWSaBsPinTDkz4ohYIS+Q F22hDBnLvUcolvkR1ZBLDGrzxXxKtNXpTIYfNg8f0YhT4fn8wt7WISTb8MCnPM60PHTj iNCrraSbc/F1QkG/Ic+gzt3HkBHPM4xJEBqg458ZwC4iHqb0HHiWomdTvL8vgDcPi3zT DeWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nyph8D8E; 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 r22si6399983edm.199.2020.05.18.10.58.26; Mon, 18 May 2020 10:58:49 -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=nyph8D8E; 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 S1731241AbgERRyD (ORCPT + 99 others); Mon, 18 May 2020 13:54:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:58368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730747AbgERRyB (ORCPT ); Mon, 18 May 2020 13:54:01 -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 EB45220826; Mon, 18 May 2020 17:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589824441; bh=FGetf+iVgy0vcrFX5izmqoZB7XMZZxHn5IEkcjsJXMY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nyph8D8EtgCp2cujLjccSTM+tAFK5nAoCfNCnEw1Hu786e9LMfic2dssZoVavfoEx LhGiKRQxbUfg1E+TjlgUbRoRTdasRXmGPceJ9d2dxt5nn4hsvEWAGsuSt3JLOTVpuO aVjJOs7d0f3qaMejLDDZFFUKGak54OZHObqMUKBw= Date: Mon, 18 May 2020 10:54:00 -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: <20200518175400.GA218254@google.com> References: <20200515021554.226835-1-jaegeuk@kernel.org> <9ba6e5ef-068d-a925-1eb9-107b0523666c@huawei.com> <20200515144509.GA46028@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18, Chao Yu wrote: > On 2020/5/15 22:45, Jaegeuk Kim wrote: > > 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. > > Hmm... this fix may cover the root cause.. We're getting reached out to one related to this issue where single SSA page is dirtied at the moment. Anyway, I think it'd be fine to get this as we can detect any fs consistency issue by fsck. So far, I haven't seen any problem in all my local stress tests. > > Thanks, > > > > > 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); > >