Merge "Use logical path to handle different dm target per boot" into main am: c322b82524
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2825095 Change-Id: I7ac7964c817d1004e8975f793feb280072b9c3a5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
ffa86e0a00
1 changed files with 7 additions and 0 deletions
|
@ -200,6 +200,13 @@ static bool create_crypto_blk_dev(const std::string& dm_name, const std::string&
|
|||
LOG(ERROR) << "Could not create default-key device " << dm_name;
|
||||
return false;
|
||||
}
|
||||
|
||||
// If there are multiple partitions used for a single mount, F2FS stores
|
||||
// their partition paths in superblock. If the paths are dm targets, we
|
||||
// cannot guarantee them across device boots. Let's use the logical paths.
|
||||
if (dm_name == kDmNameUserdata || dm_name == kDmNameUserdataZoned) {
|
||||
*crypto_blkdev = "/dev/block/mapper/" + dm_name;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue