From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01E60C433E0 for ; Fri, 15 May 2020 06:29:54 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C05FF20728; Fri, 15 May 2020 06:29:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="EDpQReRI"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="VrrBUEy3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C05FF20728 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jZTqy-0007qn-A8; Fri, 15 May 2020 06:29:52 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZTqw-0007qe-5b for linux-f2fs-devel@lists.sourceforge.net; Fri, 15 May 2020 06:29:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E8XucnNk1jYxw/3NMfANJom1juB280QDCyK4A3iOi3g=; b=EDpQReRIQ+1fkZGFbkX2KTr5da NNu78Q4Ka31iNh4DvR5BwtO9EdgsqsYY6CmP62l3oPg1/urKheVLYwggUhGCa72BwOTCEa49By+Dw lNu6vLgLkVXRvj8vhxFQN4lZ/C9PZ3lFRE8hYgYHnQcJAdas9VtJXBJ0HOtQmAGkzFO0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=E8XucnNk1jYxw/3NMfANJom1juB280QDCyK4A3iOi3g=; b=VrrBUEy3rblu6CzTCSO7cHTtEq dRS+bb3qx4TSm+CRENZimw6X892pLVodBSH2p5FNVvzR4ABTIa3RTENuGSCNEp2Wx4S+4pS1LaraJ oj3xlHzSuF/U2af5Fogj8g0QDGc4d1uJnBhk8Ca3GmtxK+LXNbOlhPAyCWMfyNmFut38=; Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jZTqs-008DqD-6b for linux-f2fs-devel@lists.sourceforge.net; Fri, 15 May 2020 06:29:50 +0000 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 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-Language: en-US X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Headers-End: 1jZTqs-008DqD-6b Subject: Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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); > > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel