Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp67978rdb; Thu, 25 Jan 2024 08:26:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPyu5QtfLhcMG0ahPf45XackNOgBOta8Ri7mPWF8iLEcalWBhJM7TKtqk/h50mgwM0Gh8Q X-Received: by 2002:ac2:5a51:0:b0:510:1a35:8ba with SMTP id r17-20020ac25a51000000b005101a3508bamr11701lfn.187.1706199964692; Thu, 25 Jan 2024 08:26:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706199964; cv=pass; d=google.com; s=arc-20160816; b=Y8rvVQpHOjKoocRdu0V/XtglORazKQd2fb+aDWiXK3wCKufsVLtHEOiqlVovqbDGVH BNvc2tr1qaB8nIU0R83hewZkZSJy97QINimnfkWy9C+iWtuFlTCSpFKhDnzI2Mi6jp8V dAs8ZGSDHqc5/NzAYUsnE6P+5NGKbfuUV3Q0HKSUfFlSWN9NVdx23WgWl20NMZyrIWma 4GsOGEesgM3yWgVSVTP+lFRFRgDWn//Dkrq+ImTfhqIR9oQGG8RYzKr07/CYGYuexLN0 pjabIutrHtANkuweplcqXp6wz8d+20TSwVaUb2b4jvcVGCHx7kMWWR3sMOcwm8cn0ET0 g5Sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=GdnADLmcOXmpEJAODZvOFI1y6zXc0+rymvs+ALAMMQY=; fh=HuYs/nCMWgnioYA45IQbrE0Q4mqt4vA6A05OslePNvE=; b=h2qFhUSpWC1ZAXKq3d6ZVrw5GwtjeLlrRpyO+wpwgQtqcNTsfZbNX7+p8YEQeeyywY SQ1AP+PhMfJT33zSOd8VoZJAU7eI8KVVtjF3Cxd74a4GZYRxCbmkWvJROEBY5YTQejiX fPE9/Jkg/0CKFAfxQn4sFmvZUuV96NJxqu0S8LscDvYQ3BFGluvOImomXCZK68u4WA96 uVXI30qWn4nK5EeVTavnOvcH9gy2033nvmsr5nz+pN94pa8geETfye06Ys40/0qIj+rs zTWJw6Iu2Q7eaj5y6FZjbTYI09oMzrP+azQ8j4NgIwhnN2GWrRhuZsQjYJrwSic4wmiN 1SPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Qrafq6sh; 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-38890-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o25-20020a1709064f9900b00a3168a8b818si928604eju.189.2024.01.25.08.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 08:26:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38890-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=Qrafq6sh; 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-38890-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38890-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 6FC641F2765D for ; Thu, 25 Jan 2024 16:26:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8735E129A63; Thu, 25 Jan 2024 16:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qrafq6sh" Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) (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 6284573177 for ; Thu, 25 Jan 2024 16:25:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706199956; cv=none; b=BKCUTtNnwa8w76wHer7oLeWrrJIXYW6pTPLCTUi9eITmbAxh0qN9LUqM/JDRClQJ7lEMb6V1dlMCBn0d1Lvw3Fp9dpZYWmprCE90A1yLqeBluiehR8SmxlaByO0NXc0zliVLDP6Yj0PNWecxhTuYFLaerLm2cgJc9p6kjtoxbR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706199956; c=relaxed/simple; bh=vZD2j7DC7ThmpeyZ0qJXeaxP/ygU0+YmklpJEPuzpa0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=eRMeJCyr5vIMVVloHJDeV/0WaBdVzoGKmJiZpB97ON8FdNsmrAlijMX6vV84mUPs3JaG/0t+c+p/MVvPxUkY+H5luaH2QpKgHTN6SMk/v+1MJknaqtvOZqYUPXkDPkVFow3VYta1aJXCZ25F2JZvAtjReBXzFVhpYnlm8dHOIR8= 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=Qrafq6sh; arc=none smtp.client-ip=209.85.222.45 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-ua1-f45.google.com with SMTP id a1e0cc1a2514c-7d2de2cc440so820804241.2 for ; Thu, 25 Jan 2024 08:25:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706199954; x=1706804754; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GdnADLmcOXmpEJAODZvOFI1y6zXc0+rymvs+ALAMMQY=; b=Qrafq6shgDvYKakj8bPLnY8Jua+5lYJF9oLETcWW7CDEUycpEEn++XlaJ3vMpovGoG PHDIrFWNnwpM/ZpAbqJxQwptdaXllHp0lmxJOQMBw/ILH2+1152UkRTnXoW08gaBntMy 9GM+pSW7EwS2Pa8Jk5BdWDA48bgjVPqbz7sNTXBrAfQaoyhL82cZDp4irOw8GlN8nrbs ZM9StCqdmDReAGyJ38ijr0Mj7wljYkkK7tfcdDGDzl/zr0J/8sIKBILsQs/UltPc1dRZ hTCHRjW+1pyNU26Ws+z5APkygfFfCvb1QWV/p29vE0Yc9oAyhCtUmt0d3DtjsiV2c+qZ Kcqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706199954; x=1706804754; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GdnADLmcOXmpEJAODZvOFI1y6zXc0+rymvs+ALAMMQY=; b=SstIMHZW9fTRJPmKIjF6g65YGl2wwmRfkIh49MLVy5dXooVzWCVTRsr/S0RnEP5e0P RdQp9vI9H89DHo8ADnkjAc+8KnkiymXcoDr5bdoeUEcVuF0fUTd7JSY9SpEV2aVRS+K6 xtZwqTmT7+ndXmer7d5Kh5gtQB6nhopmZdLktSBfD/UMJvSLV5LJ6N6oFG6GUpFR9uHo 3Sj3elcyQs506SIj96NdiVIPeLIEHE1sTOsRRjQ7R3yeM3EcnLGzMoZH3zDJf19jQ34r cjtW/svLxwHEF3Aj9KUyLeMPBhW5sd3erlxcevtv55hT2aBIdeRXHAgaSR4iVyY8WvX5 ynhQ== X-Gm-Message-State: AOJu0YwFHKtjcjNgNxb4PtwxtONdvdR8tuBsGkWXjlTIX1elA+uBUKOr yUVvNIK+4qUwrSKti0rFtjM/h0nJjxlDqvFjlOgYsWWu/3VUvY7eyUQI4iB67nr96GInaJa4tyu MXS/1aX1ZpFTD3E35ZHrTUgyIj0gVi0ffLzM= X-Received: by 2002:ac5:cd5c:0:b0:4bd:3398:61a3 with SMTP id n28-20020ac5cd5c000000b004bd339861a3mr470102vkm.31.1706199953984; Thu, 25 Jan 2024 08:25:53 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117230032.2312067-1-daeho43@gmail.com> In-Reply-To: From: Daeho Jeong Date: Thu, 25 Jan 2024 08:25:43 -0800 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs-tools: allocate logs after conventional area for HM zoned devices To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong , Yongpeng Yang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 24, 2024 at 7:34=E2=80=AFPM Chao Yu wrote: > > +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 corn= er > case. Can you elaborate more? In the case of F2FS_ZONED_HM, we have the devices[1]. Do you mean the case we format the filesystem intentionally smaller than what devices have? > > 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] =3D 0; > > c.cur_seg[CURSEG_WARM_DATA] =3D next_zone(CURSEG_COLD_DAT= A); > > } else if (c.zoned_mode) { > > - c.cur_seg[CURSEG_HOT_NODE] =3D 0; > > + c.cur_seg[CURSEG_HOT_NODE] =3D c.zoned_model =3D=3D F2FS_= ZONED_HM ? > > + c.devices[0].total_segments : 0; > > c.cur_seg[CURSEG_WARM_NODE] =3D next_zone(CURSEG_HOT_NODE= ); > > c.cur_seg[CURSEG_COLD_NODE] =3D next_zone(CURSEG_WARM_NOD= E); > > c.cur_seg[CURSEG_HOT_DATA] =3D next_zone(CURSEG_COLD_NODE= );