OSDN Git Service

Zero out blocks that may be touched by dm-verity.
authorTao Bao <tbao@google.com>
Fri, 10 Jul 2015 00:37:49 +0000 (17:37 -0700)
committerTao Bao <tbao@google.com>
Fri, 10 Jul 2015 20:50:24 +0000 (13:50 -0700)
commite9b619108dbe0c358ba6c14e27c92a623a7c1059
tree1d88fa0c5e1a9969ce22658a1d95b25279aabc5c
parent76eaa96875d5aac8d5141095e9e345a9ff84d814
Zero out blocks that may be touched by dm-verity.

dm-verity may touch some blocks that are not in the care_map due to
block device read-ahead. It will fail if such blocks contain
non-zeroes. As a workaround, we mark them as extended blocks and
zero out explicitly to avoid dm-verity failures.

Bug: 20881595
Change-Id: Id097138bfd065c84eac088b3ad49758010b2927b
(cherry picked from commit 2fd2c9bfd6c9beeaeccb4632b785227fe56c6006)
tools/releasetools/blockimgdiff.py
tools/releasetools/common.py
tools/releasetools/rangelib.py
tools/releasetools/sparse_img.py