From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933886AbdKGDkk (ORCPT ); Mon, 6 Nov 2017 22:40:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:39338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933031AbdKGDkg (ORCPT ); Mon, 6 Nov 2017 22:40:36 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 218E5217C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jaegeuk@kernel.org Date: Mon, 6 Nov 2017 19:40:34 -0800 From: Jaegeuk Kim To: Fan Li Cc: "'Chao Yu'" , "'Chao Yu'" , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: keep scanning until enough free nids are acquired Message-ID: <20171107034034.GC92599@jaegeuk-macbookpro.roam.corp.google.com> References: <001901d35775$47b598f0$d720cad0$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001901d35775$47b598f0$d720cad0$@samsung.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I merged this patch after fixing some broken format. Could you please check your email configuration? Thanks, On 11/07, Fan Li wrote: > In current version, after scan_free_nid_bits, the scan is over if nid_cnt[FREE_NID] != 0. > In most cases, there are still free nids in the free list during the scan, and scan_free_nid_bits > usually can't increase nid_cnt[FREE_NID]. > It causes that __build_free_nids is called many times without solving the shortage > of the free nids. This patch fixes that. > > Signed-off-by: Fan li > --- > fs/f2fs/node.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c > index 3d0d1be..5cef118 100644 > --- a/fs/f2fs/node.c > +++ b/fs/f2fs/node.c > @@ -2010,7 +2010,7 @@ static void __build_free_nids(struct f2fs_sb_info *sbi, bool sync, bool mount) > /* try to find free nids in free_nid_bitmap */ > scan_free_nid_bits(sbi); > > - if (nm_i->nid_cnt[FREE_NID]) > + if (nm_i->nid_cnt[FREE_NID] >= NAT_ENTRY_PER_BLOCK) > return; > } > > -- > 2.7.4