APP data lost after first R upgrade
Since the property ro.crypto.allow_encrypt_override wasn't set in Q file data in SDcard mounted as internal storage is double encrypted. So we need to revert the patch that skips encription if bio is fscrypto or blk-crypto encrypted to avoid decryption errors. Change-Id: Ic46973a092f00227e0fb2706788df4caa674607d Signed-off-by: Luiz Cressoni <lutcho@motorola.com> Reviewed-on: https://gerrit.mot.com/1952458 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Ling Jin <lingjin@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
1 parent
9aca9b9d18
commit
3bb6b25343
1 file changed
+4
-3
@@ -2879,16 +2879,17 @@ static int crypt_map(struct dm_target *ti, struct bio *bio)
|
|||||||
* - for REQ_PREFLUSH device-mapper core ensures that no IO is in-flight
|
* - for REQ_PREFLUSH device-mapper core ensures that no IO is in-flight
|
||||||
* - for REQ_OP_DISCARD caller must use flush if IO ordering matters
|
* - for REQ_OP_DISCARD caller must use flush if IO ordering matters
|
||||||
*/
|
*/
|
||||||
|
// BEGIN IKSWR-71527 lutcho@motorola.com 2021/05/11
|
||||||
|
// bio_should_skip_dm_default_key(bio) reverted
|
||||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH ||
|
if (unlikely(bio->bi_opf & REQ_PREFLUSH ||
|
||||||
bio_op(bio) == REQ_OP_DISCARD ||
|
bio_op(bio) == REQ_OP_DISCARD )){
|
||||||
bio_should_skip_dm_default_key(bio))) {
|
|
||||||
bio_set_dev(bio, cc->dev->bdev);
|
bio_set_dev(bio, cc->dev->bdev);
|
||||||
if (bio_sectors(bio))
|
if (bio_sectors(bio))
|
||||||
bio->bi_iter.bi_sector = cc->start +
|
bio->bi_iter.bi_sector = cc->start +
|
||||||
dm_target_offset(ti, bio->bi_iter.bi_sector);
|
dm_target_offset(ti, bio->bi_iter.bi_sector);
|
||||||
return DM_MAPIO_REMAPPED;
|
return DM_MAPIO_REMAPPED;
|
||||||
}
|
}
|
||||||
|
// END IKSWR-71527
|
||||||
/*
|
/*
|
||||||
* Check if bio is too large, split as needed.
|
* Check if bio is too large, split as needed.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user