Hi Damien,

On 2022-04-12 14:16, Damien Le Moal wrote:>>  int get_device_info(int i)
>>  {
>>      int32_t fd = 0;
>> @@ -1043,6 +1048,13 @@ int get_device_info(int i)
>>                      return -1;
>>              }
>>  
>> +            if (!dev->zone_size || !is_power_of_2(dev->zone_size)) {
>> +                    MSG(0, "\tError: zoned: illegal zone size %lu (not a 
>> power of 2)\n",
>> +                                    dev->zone_size);
> 
> The message should be different for the !dev->zone_size case since that
> would be an error.
I just noticed that there is a check for zero value in
f2fs_get_zone_blocks. So this could be simplified with just a power of 2
check.
> 
>> +                    free(stat_buf);
>> +                    return -1;
>> +            }
>> +
>>              /*
>>               * Check zone configuration: for the first disk of a
>>               * multi-device volume, conventional zones are needed.
> 
> Of the 3 patches of this series, this one is the only one that makes sense
> to me. I fail to see how the first 2 patches improve things.
> 
Probably I can squash them together with your comments in to one commit.
Thanks.


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to