liuchao12 9401f8f0eb resize.f2fs: add option to manually specify new overprovision
Make.f2fs supports manually specifying overprovision, and we expect
resize.f2fs to support it as well.

This change add a new '-o' option to manually specify overprovision,
and fix to check free space before grow. Otherwise, after grow,
kernel may report below error message when we mount the image if -o
parameter is specified during resize:

F2FS-fs (loop0): invalid crc_offset: 0
F2FS-fs (loop0): Wrong valid_user_blocks: 16404, user_block_count: 13312
F2FS-fs (loop0): Failed to get valid F2FS checkpoint
mount(2) system call failed: Structure needs cleaning.

Signed-off-by: liuchao12 <liuchao12@xiaomi.com>
Signed-off-by: qixiaoyu1 <qixiaoyu1@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I2ad0ecc5546a1712b7aa36230e91c3e0b1beb7e0
2024-04-15 11:31:38 +08:00
..
2024-03-21 10:39:24 +08:00
2017-11-06 20:07:40 -08:00
2024-04-15 11:29:16 +08:00
2017-11-06 20:07:40 -08:00
2023-04-13 14:13:49 +08:00
2017-11-06 20:07:40 -08:00
2023-04-13 14:13:49 +08:00
2024-04-15 11:29:16 +08:00
2024-03-21 10:39:24 +08:00
2024-04-15 11:29:16 +08:00
2024-04-15 11:29:16 +08:00
2024-04-15 11:29:16 +08:00
2023-04-13 14:13:49 +08:00
2023-04-13 14:13:50 +08:00
2023-04-13 14:13:49 +08:00