f2fs-tools: redefine MAX_SIT_BITMAP_SIZE
authorJunling Zheng <zhengjunling@huawei.com>
Tue, 23 Feb 2016 13:43:42 +0000 (21:43 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 24 Feb 2016 17:57:18 +0000 (09:57 -0800)
commitecc43cc53f2e532c32df6947b333bc669c453c4c
tree6c61402344844b864debbea8c2659d2af4cefee0
parentea34c1ce1487e72fd1ff2526a6f12449490170ff
f2fs-tools: redefine MAX_SIT_BITMAP_SIZE

During mkfs, segment_count_sit is calculated using ALIGN and
SEG_ALIGN, which are both upward. Then, in some extreme scenarios,
such as 16TB, sit_ver_bitmap_bytesize got from segment_count_sit
will exceed MAX_SIT_BITMAP_SIZE, which is calculated in a downward
method.

Unify the two calculating methods and redefine MAX_SIT_BITMAP_SIZE
to prevent sit_ver_bitmap_bytesize overflowing.

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
include/f2fs_fs.h