android_system_core/fs_mgr/liblp
David Anderson 8acb5dc1c5 liblp: Allocate "b" extents in the second half of super.
When allocating "b" partitions on a non-retrofit A/B device, prioritize
regions occuring in the second half of the super partition. To make this
effective, the region covering the midpoint sector is split into two
additional regions.

This will allow OTAs to avoid unecessary fragmentation, since each
slot's partitions will be grouped together, leaving a large chunk of
contiguous space available when the OTA deletes the target slot. Since
updates are not allowed to consume more than half of the super
partition, this should guarantee one extent per partition. Note that, if
this restriction is not in place (for example, a developer flashes a
massive "system_b"), then an additional extent will be allocated due to
the region that was split.

Bug: 120433288
Test: liblp_test gtest
Change-Id: I1797e59e14c8b0d4d0e6855a1d984e8159b21df2
2018-12-03 16:58:34 -08:00
..
include/liblp liblp: Allocate "b" extents in the second half of super. 2018-12-03 16:58:34 -08:00
Android.bp liblp: Enable building on Windows. 2018-11-19 16:20:51 -08:00
builder.cpp liblp: Allocate "b" extents in the second half of super. 2018-12-03 16:58:34 -08:00
builder_test.cpp liblp: Allocate "b" extents in the second half of super. 2018-12-03 16:58:34 -08:00
images.cpp fastboot: Warn when flashing dynamic partitions in the bootloader. 2018-11-20 12:10:16 -08:00
images.h liblp: Split super.img for retrofit devices. 2018-11-08 14:19:42 -08:00
io_test.cpp liblp: Modify NewForUpdate to accomodate two super partitions. 2018-11-21 17:36:28 +00:00
partition_opener.cpp liblp: Enable building on Windows. 2018-11-19 16:20:51 -08:00
reader.cpp liblp: Modify NewForUpdate to accomodate two super partitions. 2018-11-21 17:36:28 +00:00
reader.h liblp: Allow automatic slot suffixing of partition names. 2018-11-08 09:51:03 -08:00
test_partition_opener.cpp liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00
test_partition_opener.h liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00
utility.cpp Merge "liblp: Modify NewForUpdate to accomodate two super partitions." 2018-11-21 17:36:48 +00:00
utility.h liblp: Modify NewForUpdate to accomodate two super partitions. 2018-11-21 17:36:28 +00:00
utility_test.cpp liblp: Allow automatic slot suffixing of partition names. 2018-11-08 09:51:03 -08:00
writer.cpp liblp: Enable building on Windows. 2018-11-19 16:20:51 -08:00
writer.h liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00