Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CoW size estimate when replacing entire dynamic partitions #307

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

chenxiaolong
Copy link
Owner

Otherwise, if the partition size increases or the data becomes more incompressible, update_engine might fail to flash the partition due to the CoW block device running out of space.

Since all known VABC-enabled OTAs in the wild currently use CoW v2 with lz4 compression, this is the only configuration we support. CoW v3 also exists in AOSP's libsnapshot_cow, but is much more complicated to implement and is not yet used, even in the Android 15 beta OTAs.

Fixes: #306

Otherwise, if the partition size increases or the data becomes more
incompressible, update_engine might fail to flash the partition due to
the CoW block device running out of space.

Since all known VABC-enabled OTAs in the wild currently use CoW v2 with
lz4 compression, this is the only configuration we support. CoW v3 also
exists in AOSP's libsnapshot_cow, but is much more complicated to
implement and is not yet used, even in the Android 15 beta OTAs.

Fixes: #306

Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong self-assigned this Jun 22, 2024
lz4_flex appears to compress system images better than the original lz4
implementation used in libsnapshot_cow, so the estimates are too low.

Fixes: #306

Signed-off-by: Andrew Gunnerson <[email protected]>
chenxiaolong added a commit that referenced this pull request Jun 22, 2024
Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong merged commit f36c1ca into master Jun 22, 2024
5 checks passed
@chenxiaolong chenxiaolong deleted the cow_estimate branch June 22, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update_engine fails to flash system partition that increased in size
1 participant