From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DCFA156C5F; Fri, 6 Sep 2024 22:52:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725663169; cv=none; b=IePH6xEfxQugYNre0UbddvFyI8Y3YFrEK18nCvG+xfxU+hc3Dh3z5fwEuxa0Y9ASmDogDWks5Qes/T3YGiUZXW48gVLCxsq68ln/uj/G9pLnk+BGh8nsW3hXAdDaCkBv++yO2ZCH/YlNSpiA+lehNbCdwpCmF6CaVhZJYXodsEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725663169; c=relaxed/simple; bh=NDnhJYHmPd2gD/xHsSON9t0iaghHfHefv1ORSmknexs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f8ahdCfhDDBWVHPqn44wAKXcWS25uK7XEtdS3BIro578M6V4sFAKEFbArgMkBinnLClRVw38JDLtv0soalacOJ9rb4ZCxP3LmF6CNOhhv+JOiW6MWajfD+/9K3LusSonMMAAbD9FT32knai0d00YfmpLqLFu+yjTXm0lx/xKayY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OmOMbz1Y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OmOMbz1Y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B45AAC4CEC4; Fri, 6 Sep 2024 22:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725663169; bh=NDnhJYHmPd2gD/xHsSON9t0iaghHfHefv1ORSmknexs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OmOMbz1Yng608S7ZHV8nL7P33mP/I1cgtxwld3tlPtgBimMvyn/i3RrPZeskoiy1E vbP8PjWpEdhJlckEfJgZDQL/5/W5FJ4ya1rKqx2TEJCI9QYLvVBzt9WA0rQ/+xggy0 gmtSIPLnVlirDUNqJeQK7gZzwmxwRAfxemJ31J/GThvr7ZrAs9Z8khggJhW9LKLb2d aBXD+tcAHqvCEq7YGzxhE3mftg7/f5GsBiz5qnbOOYRCFUK9v9odrl7Eia4tnqH2mg cSJ4Ubrqyy4D0ztFqQM6HLscdAeduk6jPItefUuZY+6Fh5cyalk6NzK93yuZn/z6eC +w5Zm1Liu+wEA== Date: Fri, 6 Sep 2024 22:52:47 +0000 From: Jaegeuk Kim To: Chao Yu Cc: Wu Bo , Wu Bo , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] Revert "f2fs: stop allocating pinned sections if EAGAIN happens" Message-ID: References: <20240906083117.3648386-1-bo.wu@vivo.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 09/06, Chao Yu wrote: > On 2024/9/6 16:31, Wu Bo wrote: > > On Tue, Feb 20, 2024 at 02:50:11PM +0800, Chao Yu wrote: > > > On 2024/2/8 16:11, Wu Bo wrote: > > > > On 2024/2/5 11:54, Chao Yu wrote: > > > > > How about calling f2fs_balance_fs() to double check and make sure there is > > > > > enough free space for following allocation. > > > > > > > > > >         if (has_not_enough_free_secs(sbi, 0, > > > > >             GET_SEC_FROM_SEG(sbi, overprovision_segments(sbi)))) { > > > > >             f2fs_down_write(&sbi->gc_lock); > > > > >             stat_inc_gc_call_count(sbi, FOREGROUND); > > > > >             err = f2fs_gc(sbi, &gc_control); > > > > >             if (err == -EAGAIN) > > > > >                 f2fs_balance_fs(sbi, true); > > > > >             if (err && err != -ENODATA) > > > > >                 goto out_err; > > > > >         } > > > > > > > > > > Thanks, > > > > > > > > f2fs_balance_fs() here will not change procedure branch and may just trigger another GC. > > > > > > > > I'm afraid this is a bit redundant. > > > > > > Okay. > > > > > > I guess maybe Jaegeuk has concern which is the reason to commit > > > 2e42b7f817ac ("f2fs: stop allocating pinned sections if EAGAIN happens"). > > > > Hi Jaegeuk, > > > > We occasionally receive user complaints about OTA failures caused by this issue. > > Please consider merging this patch. What about adding a retry logic here, as it's literally EAGAIN? > > I'm fine w/ this patch, but one another quick fix will be triggering > background GC via f2fs ioctl after fallocate() failure, once > has_not_enough_free_secs(, ovp_segs) returns false, fallocate() will > succeed. > > Reviewed-by: Chao Yu > > Thanks, > > > > > Thanks > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Linux-f2fs-devel mailing list > > > Linux-f2fs-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel