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:
Wang Sheng-Hui 2013-06-28 13:21:07 +08:00 committed by Jaegeuk Kim
parent c5bf205a4d
commit 716ea385be

View File

@ -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);