UDC: Dm-Bow failed to load when size is not Multiple of 4096
BUG : 240098675
Skip Dm-Bow load incase size is not a Multiple of 4096.
Rounding down does not hurt, since ext4 will only use full blocks
Change-Id: Ie4e6634b2c49762e4669e66d94effc91d8e581ca
Signed-off-by: Swapneel Mashalkar <quic_smashalk@quicinc.com>
diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp
index 1c1ab48..742cdfa 100644
--- a/fs_mgr/fs_mgr.cpp
+++ b/fs_mgr/fs_mgr.cpp
@@ -1176,6 +1176,10 @@
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);