third_party_f2fs-tools/mkfs
Fan Li b385e9f93a mkfs.f2fs: set segment_count in super block correctly
Now f2fs will check statistics recorded in super block in
sanity_check_area_boundary() during mount. If the number of segments
per zone is greater than 1, and the disk space isn't aligned with zone,
mount will fail due to following condition:

main_blkaddr + (segment_count_main << log_blocks_per_seg) !=
		segment0_blkaddr + (segment_count << log_blocks_per_seg)

This is because when the length of main area isn't aligned with zone,
mkfs doesn't add those excess segments to segment_count_main, but adds
them to segment_count.

Here align segment_count with zone size as well as segment_count_main
to prevent such problem.

Signed-off-by: Fan Li <fanofcode.li@samsung.com>
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-03-16 12:46:13 -07:00
..
f2fs_format_main.c mkfs.f2fs: show correct partition size 2015-12-08 13:16:04 -08:00
f2fs_format_utils.c configure: add check for fallocate 2015-03-13 16:37:09 -04:00
f2fs_format_utils.h libf2fs, fsck, mkfs: call f2fs_finalize_device before exit 2014-06-13 17:06:02 +09:00
f2fs_format.c mkfs.f2fs: set segment_count in super block correctly 2016-03-16 12:46:13 -07:00
Makefile.am f2fs-tools: add library version info 2015-12-09 11:08:45 -08:00