mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
mkfs: fix the total_zones calculation in f2fs_prepare_super_block
We can count the main area as the data zones. Remove the '-1' miscalcuation. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
parent
c5bf205a4d
commit
716ea385be
@ -372,9 +372,8 @@ static int f2fs_prepare_super_block(void)
|
||||
super_block.meta_ino = cpu_to_le32(2);
|
||||
super_block.root_ino = cpu_to_le32(3);
|
||||
|
||||
total_zones = ((le32_to_cpu(super_block.segment_count_main) - 1) /
|
||||
config.segs_per_sec) /
|
||||
config.secs_per_zone;
|
||||
total_zones = le32_to_cpu(super_block.segment_count_main) /
|
||||
(config.segs_per_sec * config.secs_per_zone);
|
||||
if (total_zones <= 6) {
|
||||
MSG(1, "\tError: %d zones: Need more zones \
|
||||
by shrinking zone size\n", total_zones);
|
||||
|
Loading…
Reference in New Issue
Block a user