diff options
author | Shikha Malhotra <shikhamalhotra@google.com> | 2022-03-22 17:49:24 +0100 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-22 17:49:24 +0100 |
commit | de26b580d78d178f581ddb66c38897de6383f208 (patch) | |
tree | 7bd20567f3236624a6858f94a023b3e671c14820 /recovery_utils/roots.cpp | |
parent | Merge "Remove support for converting from FDE to FBE" am: 37a4f4d243 (diff) | |
parent | Merge "Enable ProjectID by default." (diff) | |
download | android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.tar android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.tar.gz android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.tar.bz2 android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.tar.lz android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.tar.xz android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.tar.zst android_bootable_recovery-de26b580d78d178f581ddb66c38897de6383f208.zip |
Diffstat (limited to 'recovery_utils/roots.cpp')
-rw-r--r-- | recovery_utils/roots.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/recovery_utils/roots.cpp b/recovery_utils/roots.cpp index 7fe385b5e..5c95cba07 100644 --- a/recovery_utils/roots.cpp +++ b/recovery_utils/roots.cpp @@ -154,11 +154,9 @@ int format_volume(const std::string& volume, const std::string& directory) { } bool needs_casefold = false; - bool needs_projid = false; if (volume == "/data") { needs_casefold = android::base::GetBoolProperty("external_storage.casefold.enabled", false); - needs_projid = android::base::GetBoolProperty("external_storage.projid.enabled", false); } int64_t length = 0; @@ -202,11 +200,10 @@ int format_volume(const std::string& volume, const std::string& directory) { "/system/bin/mke2fs", "-F", "-t", "ext4", "-b", std::to_string(kBlockSize), }; - // Project ID's require wider inodes. The Quotas themselves are enabled by tune2fs on boot. - if (needs_projid) { - mke2fs_args.push_back("-I"); - mke2fs_args.push_back("512"); - } + // Following is added for Project ID's quota as they require wider inodes. + // The Quotas themselves are enabled by tune2fs on boot. + mke2fs_args.push_back("-I"); + mke2fs_args.push_back("512"); if (v->fs_mgr_flags.ext_meta_csum) { mke2fs_args.push_back("-O"); @@ -255,10 +252,10 @@ int format_volume(const std::string& volume, const std::string& directory) { "-g", "android", }; - if (needs_projid) { - make_f2fs_cmd.push_back("-O"); - make_f2fs_cmd.push_back("project_quota,extra_attr"); - } + + make_f2fs_cmd.push_back("-O"); + make_f2fs_cmd.push_back("project_quota,extra_attr"); + if (needs_casefold) { make_f2fs_cmd.push_back("-O"); make_f2fs_cmd.push_back("casefold"); |