Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b191894 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

build_image still too aggressive with right sizing (part troix)

Regression introduced by c3d408e3

Found a case where 1 + 1/60 reduction in size based on free space
failed when right sizing an ext4 image. Reduced the math to 1 + 1/61.

Test: compile
Bug: 111302946
Change-Id: I0f32c75e80b5da4d47671055ac274ccc2b485992
parent d0b97582
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None):
        logger.info(
            "Not worth reducing image %d <= %d.", free_size, reserved_size)
      else:
        size -= free_size + (free_size // 60)
        size -= free_size + (free_size // 61)
        size += reserved_size
        if block_size <= 4096:
          size = common.RoundUpTo4K(size)