mkfs.f2fs: fix wrong ovp space calculation on large section
If a section consists of multiple segments, we should change the equation
to apply it on reserved space.
On 128GB,
option overprovision area reserved area
-o5 -s128 9094 6144
-o5 -s64 6179 3072
-o5 -s1 3309 48
-o1 -s128 27009 26624
-o1 -s64 13831 13312
-o1 -s1 858 208
-s1 858 208
-s64 * 13831 13312
-s128 * 27009 26624
: * should be wrong.
After patch,
-s1 (ovp:1%) 858 208
-s64 (ovp:4%) 6172 3712
-s128 (ovp:6%) 8721 5120
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 file changed