Merge "emmc_optimized means stable_inodes" into rvc-dev am: c05e7c0236

Change-Id: I4ff8faf5b580f7048f3828258f09a827da3903fb
This commit is contained in:
Paul Crowley 2020-05-23 22:37:51 +00:00 committed by Automerger Merge Worker
commit 9d0ade6dd8

View file

@ -454,7 +454,8 @@ static void tune_encrypt(const std::string& blk_device, const FstabEntry& entry,
<< entry.encryption_options;
return;
}
if ((options.flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64) != 0) {
if ((options.flags &
(FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 | FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32)) != 0) {
// We can only use this policy on ext4 if the "stable_inodes" feature
// is set on the filesystem, otherwise shrinking will break encrypted files.
if ((sb->s_feature_compat & cpu_to_le32(EXT4_FEATURE_COMPAT_STABLE_INODES)) == 0) {