Merge "UDC: Dm-Bow failed to load when size is not Multiple of 4096" am: 525c8bbc08 am: 6062d29256 am: 6263f499cc

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2401132

Change-Id: I49eced12263c0246c5050cb2df5e58a1dbf7a03f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-02-07 20:49:34 +00:00 committed by Automerger Merge Worker
commit d9b0b01919

View file

@ -1176,6 +1176,10 @@ class CheckpointManager {
return false;
}
// dm-bow will not load if size is not a multiple of 4096
// rounding down does not hurt, since ext4 will only use full blocks
size &= ~7;
android::dm::DmTable table;
auto bowTarget =
std::make_unique<android::dm::DmTargetBow>(0, size, entry->blk_device);