From 203057cb9b06df8962958ae1fae1ac2b2d14c405 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 31 Mar 2021 20:01:41 -0700 Subject: [PATCH] Relax inode usage estimate. The current inode usage estimate applies a factor (1.04x) to account for differences between the directory and file count and what mkfs.ext4 produces. Bump this to 1.06x to allow more leniency. This increases bramble partition sizes by 32KB total. Bug: 182365132 Test: manual test Change-Id: I9ade82cb89422e31ae8c5df9fff31157e88278c5 --- tools/releasetools/build_image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index 3726df6b6..301d0dafe 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -73,9 +73,9 @@ def GetInodeUsage(path): """ cmd = ["find", path, "-print"] output = common.RunAndCheckOutput(cmd, verbose=False) - # increase by > 4% as number of files and directories is not whole picture. + # increase by > 6% as number of files and directories is not whole picture. inodes = output.count('\n') - spare_inodes = inodes * 4 // 100 + spare_inodes = inodes * 6 // 100 min_spare_inodes = 12 if spare_inodes < min_spare_inodes: spare_inodes = min_spare_inodes