f2fs: fix wrong total_sections check and fsmeta check
authorWang Xiaojun <wangxiaojun11@huawei.com>
Thu, 17 Sep 2020 11:11:58 +0000 (19:11 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 29 Sep 2020 08:48:34 +0000 (01:48 -0700)
commitf99ba9add67ce63eca3fe68a3d5e9996cd2c33b5
treef963e0b6dd4de1ffae475aa9ea3aa03e1e598541
parentd89f589130160a988c0108c81e6b13e0831d7603
f2fs: fix wrong total_sections check and fsmeta check

Meta area is not included in section_count computation.
So the minimum number of total_sections is 1 meanwhile it cannot be
greater than segment_count_main.

The minimum number of meta segments is 8 (SB + 2 (CP + SIT + NAT) + SSA).

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.h
fs/f2fs/super.c