Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp263980ybk; Thu, 14 May 2020 23:31:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVOujtMEAKQ+lKIdFOiCgJO5eulQs98cekYevaTi8Fsxpyvnpq09wQVXB7ElkOmkbIIJnF X-Received: by 2002:a50:cb8a:: with SMTP id k10mr1403374edi.345.1589524288087; Thu, 14 May 2020 23:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589524288; cv=none; d=google.com; s=arc-20160816; b=qznDrP/eKaLdemba/0rq+7eV6dRN8ouVS4S9EZJI7QsjK5tcaU2zQq8gPXKHWFWRpE X7WOr0U9VsiK8MfEw528MrCkA05MJuZDp/tK1TKzl3CuWvFlcnQcEIMWe8f9KLlOzDJm XhMfAECfqvUEWuzj06qIiZzLVcu04m+vj8IfMJKIuuGsWH3ogp2rXhki1gQ2sKwfWv2y oB50+PyLr9Ot8JLa/hvZoqZGQjPVzWSJAP57KNYuw58GHptY8i+6delzTQ4IH2Xd6qV5 ftwCmzrGXbUwxF03bUlPUHMYSnEmqdJD/gVY540SWSnGgj7GK8ZBDudKV4508p4aSwk9 Kuog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=E8XucnNk1jYxw/3NMfANJom1juB280QDCyK4A3iOi3g=; b=g15kjhUnAy1SOtqF67yVyAfaNHa+1a2dj2o45HM9vxuBO0E7S+nQLZj8XtkR9Fl8Ry hnv/9U7Jmhc66P7DhXtMe4C0apcor1zCK/xnYyZSKlbl3k2CDsZepUoqY2NJNCXAouHV 18bMQ4p0vThFSt+Wx8TnRbzH7ZRj/NVoL+rB7SQBQk2yr7LmOb/aVTmkp5tBj9CxoFwO OI25zCv5myfmwjUH6joQRjoRGFxJ8YKZk0NEe9wUaUwjZr5AivlQXYgonnpj0ult+7UH SNJVdb3ep4bRMvTL20KGcsC9T3rxpeXEzGNsJ/184cgbriMM2lyEehgLBh/fxIJmeFNZ R6LQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m31si588354ede.443.2020.05.14.23.31.04; Thu, 14 May 2020 23:31:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbgEOG3k (ORCPT + 99 others); Fri, 15 May 2020 02:29:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:32978 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726205AbgEOG3j (ORCPT ); Fri, 15 May 2020 02:29:39 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C6E49201A20949FFD2BB; Fri, 15 May 2020 14:29:37 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.211) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 15 May 2020 14:29:34 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them To: Jaegeuk Kim , , , References: <20200515021554.226835-1-jaegeuk@kernel.org> From: Chao Yu Message-ID: <9ba6e5ef-068d-a925-1eb9-107b0523666c@huawei.com> Date: Fri, 15 May 2020 14:29:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200515021554.226835-1-jaegeuk@kernel.org> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/checkpoint.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c > index 620a386d82c1a..9a7f695d5adb3 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); > @@ -1493,8 +1496,6 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) > sbi->last_valid_block_count = sbi->total_valid_block_count; > percpu_counter_set(&sbi->alloc_valid_block_count, 0); > > - /* Here, we have one bio having CP pack except cp pack 2 page */ > - f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO); > /* Wait for all dirty meta pages to be submitted for IO */ > f2fs_wait_on_all_pages(sbi, F2FS_DIRTY_META); > >