summaryrefslogtreecommitdiff
path: root/scripts/update_device.py
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2020-09-23 12:55:19 -0400
committerKelvin Zhang <zhangkelvin@google.com>2020-10-01 15:34:49 -0400
commit9bd519d4f5b5cf537038a3beb27efe0e196523cd (patch)
tree7d5f4875025b84847160e5472f7387e696710ad5 /scripts/update_device.py
parentd1d52a0b4b59be633e674dbc012baff97f8d0c80 (diff)
Add partition writer class.
Previously, delta_performer assumes that each InstallOp can be processed independently, and therefore it creates an ExntentWriter instance for every operation. It also assumes that source/target partition can be read/written using raw system file descriptors. With the introduction of Virtual Ab Compression, both assumptions fall apart. We need to process all SOURCE_COPY operations and reorder them according to merge sequence, which means InstallOperations are no longer independent of each other. Also, VABC requires us to perform writes using their ICowWriter interface, as opposed to read/write syscall. We can add extra logic to handle these cases, but that will make the already huge delta_performer.cc even bigger. It's 2000 lines right now. So instead, we plan to add an additional class called PartitionWriter. Which is supposed to perform partition level initialization, such as performing SOURCE_COPY ahead of time according to merge sequence, setting up snapshot devices, etc. This will make our code more maintainable. The purpose of this CL is to refactor DeltaPerformer, and move some of the logic into PartitionWriter. Future CLs will add a PartitionWriter for VABC. Test: treehugger, generate && serve an OTA Bug: 168554689 Change-Id: I305fe479b22d829dde527ee01df0e48e4dcb7b46
Diffstat (limited to 'scripts/update_device.py')
0 files changed, 0 insertions, 0 deletions