Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1519224rdb; Wed, 24 Jan 2024 19:41:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFP04BBjODymYCUvY0J/mXQl7P7+8ZUIFzEke+rqB6bQHdt7NPlrda84Z4E5/HJctl39pmk X-Received: by 2002:a05:6402:2052:b0:55c:7350:98a7 with SMTP id bc18-20020a056402205200b0055c735098a7mr294433edb.27.1706154112405; Wed, 24 Jan 2024 19:41:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706154112; cv=pass; d=google.com; s=arc-20160816; b=uUAi7z9jzQ7gVV0qz/fqrBZ198cVA/Mn2a/+hJNYO95MkG2dxulZUpAXcumX2P75rD aww9JrxG8tLb9Jwq6UVvKX8ABJMr/cn/zkyhXJ79wO8fPrH1OxReMZqu3zawzT5HZMo6 yE0ZUXXZs6Cxq47VDFh8vrvKdzlZgHjjiuvccT4abrAxM70m5UXLQBiN7dZNKyuj7/yM 34au70IYyYjMaUPNPxaCJGyu91xU7cFW94xvSm39p1aPLn6d0yYrOxZox+vHyeAPCoRv Ryzxe7atqkyhOhPeaWW+0nfsEKC8ttdRXpcs/hV5dKl2exklNSv2cSDniQDdcDLWqx0M +qMQ== 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=85PNoXKF38NmEyXNhJvMRCaZAca13Cuuggi7QGp02cE=; fh=bC4nv95HuIwnAAhFl2z9hH7A3/PlLkM3ifDr6ArRaUY=; b=eRonuS0Iq8aYKWy3cB/ZKCOe+8ilbCWabqBGJI9zlHliCMlsyz1r8pCKySx/jTP8fe R+H7aTRj9ve0h8B5H/5GyQYPiyWylflsM/KOMTEGNk3EMveWB0pGr6X3awUlP4dpFqHw EOqANlYXsC7jEcxPUAzQho8lez/q7ziSweWJrKsmklA238H8N9JshJG3v73SIWvs88US 6nw0TFD//AleXEUE1FQA1gjXtwyRLHQr5Cub7uYjwptuGkTHeH88EWQbPD0g3qw/kxtS dxb7yknBYmaZ52jbQlHHSx7Oy4gAAwFpDsBqpb+Ebbq09+4uOnqE4czz9kRxl0h0ELmO HiuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cpk4h8KO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-37926-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ek22-20020a056402371600b0055c868c7d76si1006655edb.333.2024.01.24.19.41.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 19:41:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37926-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=@kernel.org header.s=k20201202 header.b=Cpk4h8KO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-37926-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37926-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0EE8E1F267E1 for ; Thu, 25 Jan 2024 03:35:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F133879C6; Thu, 25 Jan 2024 03:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cpk4h8KO" 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 251CA6FB6 for ; Thu, 25 Jan 2024 03:34:36 +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=1706153677; cv=none; b=gpd6PKJVX1Q5dzzaT2Y9tBNvSZLp3zcRuaVlVO+iCnbJ98BYyh/hLmNRtnecn4Hzzv9CxPENGRKJjyvTWKws1E77OtKZN+CHV8y9ryiuA1GPCeEaQcCohJD74DwpPd/jdprsmL99KYvCj4Re6wN91010oj0tAubobfzEKHMB4n8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706153677; c=relaxed/simple; bh=5nKlkdVTP90VlmmNuw9xvFlkteOuuubePKwYu2lTc2Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Go1YlOTRbc429keW6iwosnElLxfaU0/O9PYaim7eaiXFDAXKPRAXN8N0du2EHjXwJWEW4fuaQsOlYFgixdMIKA3yytEohcZz8QA/tbWW56P0aQ/u/Cid/OH05e+SBWU923iQhKPH8fKCX+0vfMmfxb1ruDW+nAc3AC3Aejx4AHY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cpk4h8KO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B3CBC433F1; Thu, 25 Jan 2024 03:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706153676; bh=5nKlkdVTP90VlmmNuw9xvFlkteOuuubePKwYu2lTc2Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Cpk4h8KOwrzfshK6xRI4StxzD92WE9EX2ADLsHospm0v8cP72aQ32l4HbC6Yz0WA/ 6JQdG8wvKXMPFN8KjfNfV0yECRq+VlRwFsD0b7+grCUE8o62KSRHl70o2BPM+HkYqf PAgpuY0hq74NGMFXnfrphamHsoWFx+aqS6y4S/Y13TY1DeSG6GAWuIuM6PUjL9b3YR BJB7XWUhGXx7rvnwb0ZPcPDzT5+eyZUZlvf4b6P99LeQCDCyzpkvNBM46N7UZvihdz AJQ6RilSTj/yb1wv+2N46AFxwLDvbV90oFmBRc+2C+XNdUgXW8R1q5OHFAlRVAsXKL SNdPyUfN9o5/g== Message-ID: Date: Thu, 25 Jan 2024 11:34:32 +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: [f2fs-dev] [PATCH] f2fs-tools: allocate logs after conventional area for HM zoned devices Content-Language: en-US To: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Cc: Daeho Jeong , Yongpeng Yang References: <20240117230032.2312067-1-daeho43@gmail.com> From: Chao Yu In-Reply-To: <20240117230032.2312067-1-daeho43@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit +Cc Yongpeng Yang Daeho, Yongpeng reports a potential issue: if c.devices[0].total_segments is larger than segments of mainarea, c.cur_seg[CURSEG_HOT_NODE] will exceed end boundary of mainarea. Could you please check that? though it's a corner case. On 2024/1/18 7:00, Daeho Jeong wrote: > From: Daeho Jeong > > Make to allocate logs after conventional area for HM zoned devices to > spare them for file pinning support. > > Signed-off-by: Daeho Jeong > --- > mkfs/f2fs_format.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c > index f2840c8..91a7f4b 100644 > --- a/mkfs/f2fs_format.c > +++ b/mkfs/f2fs_format.c > @@ -557,7 +557,8 @@ static int f2fs_prepare_super_block(void) > c.cur_seg[CURSEG_COLD_DATA] = 0; > c.cur_seg[CURSEG_WARM_DATA] = next_zone(CURSEG_COLD_DATA); > } else if (c.zoned_mode) { > - c.cur_seg[CURSEG_HOT_NODE] = 0; > + c.cur_seg[CURSEG_HOT_NODE] = c.zoned_model == F2FS_ZONED_HM ? > + c.devices[0].total_segments : 0; > c.cur_seg[CURSEG_WARM_NODE] = next_zone(CURSEG_HOT_NODE); > c.cur_seg[CURSEG_COLD_NODE] = next_zone(CURSEG_WARM_NODE); > c.cur_seg[CURSEG_HOT_DATA] = next_zone(CURSEG_COLD_NODE);