Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1559194rdb; Mon, 19 Feb 2024 22:51:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVRD5KmnWrW287dZrHdzSd1RD6NhP6pSxMq+ldDdevk6dMkN3oeWyKcaT2i7EtYM3beV5m/F+0MCKQRQUmahlUDnEzH7mmlEdmUSGoAbw== X-Google-Smtp-Source: AGHT+IFqc/L0gykDBJ56Tr+wDmQYr0Vc74NaIsWQcl293SW3HgkUQWMuuunBhqU+3LW/pk+JbbH0 X-Received: by 2002:ac8:4684:0:b0:42d:e05b:bb79 with SMTP id g4-20020ac84684000000b0042de05bbb79mr12033201qto.18.1708411867705; Mon, 19 Feb 2024 22:51:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708411867; cv=pass; d=google.com; s=arc-20160816; b=oQmG93VochaCFp8b6DFduMCts631qgaIusbmDNaJjkhO0+jYHKRDhtKOcFmhrX1h5n tw11mVpuVHhJdiOso1NXpO9MOtLBnlvfomGFxpV+LjcAKvq9l47IN77tofIi/QIq5kOB LabOlpHNM3j6Vp/buGPLKOlrUuZeke5saD1Fgu6trYSB825+W8IK8h+ALzsMmT/HZSod je6ijJTUSljzLdBJbOGhj8SL/uGwQOhrE8k+lwMnNis3HggAJJ5xQs/gURu45Q3u7Hil wBfy7qkpUJcqV+a4ycizcD68o0KAw+C4A7qMlgTjVAuhRPXNY414M5NTQu2TB5moDpOG lUmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=BP0KseMVyXdTloNsqEMqrZbRTmICvx48ZT1gMfrG85w=; fh=1SCgx7Ohexow6+u9werFLy/aOviqRE+KMWXybkRdOyk=; b=wAlI9Slq1J4/a83LVCsNJlEWPJHi07jKxC8PhgXeXCqDl0uy22mLW5NTbGmqE0SFeW b9EWweCtU+OKBk0IPGVVW/sHaMJj5giCvXY+jf91hDV0Gz9DGRc8XDO842DMiaqYNoO/ bSYgZWQ0zA4p24ct2v7fSuCJB8Rvj2jgcpppdGC/Bu/8Biss+hemy3npEO3zxtp5zwk7 NPi1Kr1Kb1StLjXGJZrBRbQnTHW+anpfhNzoh18nmHdCYb7C3A58GNezt5K9uaf9T57s M8ji7xhjpSoCkRZ4wDwh15rjfw3zvS2HcGKY2Tq/iK39yffeMsvSk8Y4IjeEtNiwtqCi Ihag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UpNNGn6x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-72430-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h21-20020ac87455000000b0042dd32cd47csi7703529qtr.375.2024.02.19.22.51.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 22:51:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72430-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UpNNGn6x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-72430-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 43EA11C218A6 for ; Tue, 20 Feb 2024 06:50:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE0F82E3EB; Tue, 20 Feb 2024 06:50:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UpNNGn6x" 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 0F997186F; Tue, 20 Feb 2024 06:50:17 +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=1708411818; cv=none; b=LEqa5dWESf9sz5TGFlpD25F5n5Wz1fVzdtFgruZyrfNsDjm4jD812Qr+QWZ3rvLxAjUB5aQlEhDqDlvA+Pr7KJ//ExdjOV0fw8LF2SQoRnehNF9iDFkOWElVNvU+2pKYLxIyNKSKKemMEVzyyY83YyhwYGh042XGAtDawK1Yn+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708411818; c=relaxed/simple; bh=IPBlD9TMdkVk8QBHkD6dEwxAl+m+4DmFxsgsXh2F9go=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kO6xba+iq2TXl+OsgP7iQi4G3JZbYu/E+V99t0U4NJHxiY3DDbEJz+kfieGupaxMECrd779uffTfnBG6/TaW78JAzSNsENPnDzQDLZUUAW6/g2bgdJ6oxNEpGaeCxG79xqAm2yg3zLqLJZQ/lvgPUMObEcdEfC7eiKk2TpShMFU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UpNNGn6x; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E030FC433C7; Tue, 20 Feb 2024 06:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708411817; bh=IPBlD9TMdkVk8QBHkD6dEwxAl+m+4DmFxsgsXh2F9go=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UpNNGn6xAJiuHKtXcdVxpuPblf6NJYhvnuqnF1ax/trXw25ayAPalGxYTJjIQDrfb uP7jQv0WomocoMV/q3unNO78n39l/R85ImfvpkfSNbzz0XK/jqRECnabxpxbeTGkfh +YL7zXeYonH0B8+2p60ci3Gh59f6FZ/ybIUUDL90eZjjlFSmL0JzI1iyHsDW+dxmtT q8/gKuRs7zAR45WnTPVE4kNbxdnF+nGaN/IE4h3jkqShR3W65g/oO0Ypln7PD86K6f e+LilT/X/CBNrMUO9Z4t44eGP9VKCfjFnb0S0aDYNzFoCgzbjouZ+cbdWpMEML/wcy nrZ+sL5a/KK2Q== Message-ID: Date: Tue, 20 Feb 2024 14:50:11 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Revert "f2fs: stop allocating pinned sections if EAGAIN happens" Content-Language: en-US To: Wu Bo , Wu Bo , Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20240205031415.557879-1-bo.wu@vivo.com> <793fd834-fe28-4647-b2cf-0012acb95b43@kernel.org> From: Chao Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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"). Thanks, > >>