Skip checking files that have less blocks in block map.
When creating ext4 images with mke2fs, it may skip allocating some blocks if they contain all zeros. As a result, there could be less blocks listed in the block map than the actual file length. For example, for a file with a length of 112200-byte (27+ blocks), the listed blocks in block.map could be '43665-43688' (24 blocks). Because some all-zero blocks are not taking actual space. The generated ext4 images are perfectly valid - kernel will figure out that data block is not allocated and writes all zeros into user buffer. However, we can't fully reconstruct a file from its block list in our Python script. Ideally this can be avoided by mounting or parsing an ext4 image directly, which is yet to be supported in our script. This CL skips checking for such files to avoid failing validate_target_files.py. Bug: 65213616 Test: validate_target_files.py passes on targets with mke2fs generated images (e.g. marlin). Change-Id: Id9cc59e345b9283844044ef94ceb5702f0ca0526 (cherry picked from commit b418c30e)
Loading
Please register or sign in to comment