From: Chao Yu <chao@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: chao@kernel.org, Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v2] mkfs.f2fs: ensure zone size is equal or bigger than segment size
Date: Fri, 23 May 2025 10:06:34 +0800 [thread overview]
Message-ID: <52eee781-f53c-46a9-8ce4-96c5a0589240@kernel.org> (raw)
In-Reply-To: <20250522182644.2176645-1-daeho43@gmail.com>
On 5/23/25 02:26, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> Otherwise, it doesn't work with a crash.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
> v2: relocate the code
> ---
> lib/libf2fs.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/libf2fs.c b/lib/libf2fs.c
> index d2579d7..148dc12 100644
> --- a/lib/libf2fs.c
> +++ b/lib/libf2fs.c
> @@ -1347,6 +1347,11 @@ int f2fs_get_f2fs_info(void)
> }
> c.zone_blocks = c.devices[i].zone_blocks;
> }
> + if (c.zone_blocks < DEFAULT_BLOCKS_PER_SEGMENT) {
If c.zone_blocks can not be aligned to DEFAULT_BLOCKS_PER_SEGMENT, do we need to
handle below code?
/*
* Align sections to the device zone size and align F2FS zones
* to the device zones. For F2FS_ZONED_HA model without the
* BLKZONED feature set at format time, this is only an
* optimization as sequential writes will not be enforced.
*/
c.segs_per_sec = c.zone_blocks / DEFAULT_BLOCKS_PER_SEGMENT;
Thanks,
> + MSG(0, "\tError: zone size should not be less "
> + "than segment size\n");
> + return -1;
> + }
>
> /*
> * Align sections to the device zone size and align F2FS zones
next prev parent reply other threads:[~2025-05-23 2:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 18:26 Daeho Jeong
2025-05-23 2:06 ` Chao Yu [this message]
2025-05-23 16:40 ` [f2fs-dev] " Daeho Jeong
2025-05-26 8:02 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52eee781-f53c-46a9-8ce4-96c5a0589240@kernel.org \
--to=chao@kernel.org \
--cc=daeho43@gmail.com \
--cc=daehojeong@google.com \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®