Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp116136rdb; Thu, 8 Feb 2024 00:12:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3v3vIAWVwtpcstmh+XSCCgjMwEqjSfbzJ2OJ+doM1wd2SpNbkmbissz65NNyqMwzEBeo+ X-Received: by 2002:a05:6402:1814:b0:560:987:76e2 with SMTP id g20-20020a056402181400b00560098776e2mr5116207edy.40.1707379938586; Thu, 08 Feb 2024 00:12:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707379938; cv=pass; d=google.com; s=arc-20160816; b=wcnBB7VSTuVR7QjonM9RhtbAaTLzyAl6skvDanCD4d0JlwjALHBB82nwq0OENpKsNi N9ORrKmF1oIamzy4hn4BnU3jL+eUuyHWikEN7tg8SwVvI44+xxd0a2xDxYIvj8WEC+mr dC6/PgSw2OPmm6m2fkqZFiXRIwuyXMhgKBNHhMWijY9LbcN2fGI32zUVKJNxZ7KRpRui f2FkrNm3Vi+quvGj1xzs/JtuifIEP8CfeMijeJUVVeZzG4uEiI0sBxCyBOtgOfryClet Vcct1YJ7RPj2h/QFvrFnNwlyECehnAnjn/8yDr1FvrvMEfI9ykkkPRRedwCY4/EJhxsB Jk7Q== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=+EzGcEGSGki041mX/q4WVvvLib1LrKkmNOXMbNSMe9k=; fh=WFTGVmcKZkxRd4QqPx6For7WrX6ll95Mt2aesVSGYS0=; b=Xwdmab34Ochiqjq4OYpXb7OIzRV+4HfpP0+HaBRSFmB5FTIOpGsAN2zQ151iVrCFdZ Xfjy09wI8NEqFYuDlBbeG4o2qGOgITeGVP9PG5hmoj+G5PLQzCSwCQ7j8KUKcOa7+TW9 47UBFr6OH3l00aziPY3i5pgrsoCt7As5ukolu7CoOHtCErP8KABqsCVUDkvrPBsSYc5W CJrXYtJyNDPorcdJ3rFPGNKtLgwI5z+0c3gTx7RQZr2bsBavQbvh+omvQp83cNgISpXt iUb/HHZyfKV8ID7rLJNBeNGN+xtayr4+KSrZJxrJwa0VbupxsQKu1U4hCionQqQ2ssb4 3dcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AbswsTdN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-57591-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCXHweBpJz9s2YJPUr3+MG9NTTO3IGp5oN9eBsMPqiumeLHeK918LaDb8ZClBZp7SqvUMYAKNruON/eb5xx97TRZ/vH22iHuLsKiT3QEpw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bd2-20020a056402206200b00560ad0a999bsi661912edb.189.2024.02.08.00.12.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:12:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57591-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AbswsTdN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-57591-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 354E31F22CEE for ; Thu, 8 Feb 2024 08:12:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 718EC6A01A; Thu, 8 Feb 2024 08:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AbswsTdN" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E1086A02E; Thu, 8 Feb 2024 08:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707379919; cv=none; b=hb7GCfAbJH/kModMW+55F1xOIQiRJ25BR0U8P5EcKuc/s3vpNInMF9wJIU04HiN/ohizTJGpoabdvJgAhawUZUZ8cJ/0CfgUTflcfFxIoAw7FDoE+jB1t6nkmw+QUT+k9dTSdTeL5p/eIjlh2aFbmYUIuDrN9SvixJngPmaPejY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707379919; c=relaxed/simple; bh=r2gDOJZsfcEKcNeXFgVU4/d8DvY6q/9pRPxUslnQm+A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rOxbfn0wAClHj6QfGKzrK4mIfX7V8y9F9FDPLde6IgPSsOx0pjjVoTaKjKiqHrz4+Rn+Q+80IjxFEwqCDZzY/L1dInna8eSWrTsgUwv3EmQvarAj1l6A2GesffnJdgNFomFUnMpEIcZRycdmw6xwydepe0p8BQZjnKMzqKVnmgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AbswsTdN; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d94323d547so14096635ad.3; Thu, 08 Feb 2024 00:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707379916; x=1707984716; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+EzGcEGSGki041mX/q4WVvvLib1LrKkmNOXMbNSMe9k=; b=AbswsTdNrXW4JOEzBSKCm3xLFTEk1LoZKKxB7RDsrmvXD9Hsr42BwqAg5rS7d8Ab7u 2TVbCwmRTkq5hX5TgAxAIpg5tRonx3bTCOgzsIanaypTU7h5jJzr6rRGfi8UibsZ0VFV eGvceRd8j09rQ1DROAKg8wW3+1RD7kIGG9zqiOdXZ9Cy8+WPMDo2If7ecZGa3cY0qiGV bblBNjwshQbDfNAaGKvZxY3rexEgQo3teaS6QlBHj2EhYR4P6qHp7/RKdWo/pVKnXEXk ddhpdczEW/rCli/lzBNU3BQJWd/bQXBA9xlLZfW7Lavlu+mGzOFOY6kDVWvJ7Vee6usq uRgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707379916; x=1707984716; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+EzGcEGSGki041mX/q4WVvvLib1LrKkmNOXMbNSMe9k=; b=qMqckgOMI9N0vSdo+alGV5nkaSXhWv85dXOkjGn3tlNDrLMswtEbTcpwNchQPZjB7j bGvrGMbzKLTeg7W/0/1xTHnKzbN8IB7rlLWg61ZWLrSlWSInJsgQXcrEJZodbl1HKqiF B2UseILIoUlXUswLxN2GSZAUlpTJs6dNuZFASi0jfdQvofkZVlexYugDsdqvZOlWrZOg Co3zoeFiKYRyR9/VtsXP78oBT8Wv9Mp2qCFFSmYXKCYF92K3KM5d54/zRPGGRMWEZIlO +6H+7sO5N2wJSXwUn0OESM4YL0DYDc4eV8fOAyKV6ztLXZfptiYHv9sc3YwvJbL6NKK8 ZH8Q== X-Gm-Message-State: AOJu0YxnkJezFiNjzGZ1T+6394hJlJnuaehTU7+Hg7D9uTZNLaIU91ES fmJxKUcG3IxLSa0GrKqV89H42c5+yuZg8q+h2zFFLZwRFugfXwwr X-Received: by 2002:a17:902:ead1:b0:1d9:6381:a4b3 with SMTP id p17-20020a170902ead100b001d96381a4b3mr6541505pld.36.1707379916398; Thu, 08 Feb 2024 00:11:56 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVM0Eei7B+s2xu7LIQ5YQ3htmsre/Zi1BiMcqbTuBhg1gCskj5rTO6VTnGufF83HLSNCtEAExblGgFcT8yp/ZF3LR5ZEDEeAYrVsobqzAxjQGDoYqbhVmCV4nyw38q4NiyLY56twVdxK0e2AFytP+cpdv3aFE6RFHGg23dfp3TvQKGM5XgDRhwP Received: from [192.168.50.127] (42-98-185-035.static.netvigator.com. [42.98.185.35]) by smtp.gmail.com with ESMTPSA id h4-20020a170902748400b001d8e5a3be8asm2764386pll.259.2024.02.08.00.11.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Feb 2024 00:11:55 -0800 (PST) Message-ID: Date: Thu, 8 Feb 2024 16:11:50 +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" To: Chao Yu , 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> Content-Language: en-US From: Wu Bo In-Reply-To: <793fd834-fe28-4647-b2cf-0012acb95b43@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. >