lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <10dde2aa-f2f3-4553-9fc0-a0659e0c5543@kernel.org>
Date: Mon, 26 May 2025 16:02:39 +0800
From: Chao Yu <chao@...nel.org>
To: Daeho Jeong <daeho43@...il.com>
Cc: chao@...nel.org, linux-kernel@...r.kernel.org,
 linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com,
 Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [f2fs-dev] [PATCH v2] mkfs.f2fs: ensure zone size is equal or
 bigger than segment size

On 5/24/25 00:40, Daeho Jeong wrote:
> On Thu, May 22, 2025 at 7:06 PM Chao Yu <chao@...nel.org> wrote:
>>
>> On 5/23/25 02:26, Daeho Jeong wrote:
>>> From: Daeho Jeong <daehojeong@...gle.com>
>>>
>>> Otherwise, it doesn't work with a crash.
>>>
>>> Signed-off-by: Daeho Jeong <daehojeong@...gle.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?
> 
> We need to make sure that c.zone_blocks is a multiple of
> DEFAULT_BLOCKS_PER_SEGMENT, right?

Yes, if c.zone_blocks % DEFAULT_BLOCKS_PER_SEGMENT is true, we should fail mkfs?

Thanks,

> 
>>
>>                 /*
>>                  * 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
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ