summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2018-08-01 14:14:37 -0700
committerDavid Anderson <dvander@google.com>2018-08-02 10:33:41 -0700
commit4d9c7459c4fa7baaa61fb3cb930039096f844fe3 (patch)
treea07eaeca5ab8e6d680a916066ac6679dfe6d0548 /trusty/coverage/coverage_test.cpp
parentde1daa72aaa25de8b61f004457a60b8f4527dec6 (diff)
liblp: Require block-aligned partition sizes.
DM_TABLE_LOAD will reject dm-linear entries if their size is not a multiple of the backing device's logical block size. For example, a partition of 10GiB+512 bytes will fail to map in device-mapper if the logical block size is 4096 bytes. To address this, this patch adds a few changes to liblp: The block size given to lpmake is now recorded in LpGeometryMetadata. The block size must be a multiple of the sector size. In addition, partiton sizes are now aligned to the block size, and the super partition must have enough free space to allocate at least one block (in addition to storing metadata). GrowPartition now has multiple checks that the block-size invariant is not violated, to ensure that no invalid partition tables will be created. Bug: 79173901 Test: liblp_test gtest Change-Id: I484aac1f9b90ebd92dc1c89ce1e09cd89bbb441e
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions