summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlin.gui <lin.gui@mediatek.com>2021-09-13 16:37:01 +0800
committerGaurav Sarode <sgaurav@google.com>2022-02-03 00:31:14 +0000
commit681c629a9e32e61b8d29a0cac72a9beeb287049e (patch)
tree1669f0456d99274a90b9d1064008a7c1a9cfa2a4
parent1d49ec7aab20d1b4b7b6e6dda28fcfaaf73a64e3 (diff)
downloadvold-681c629a9e32e61b8d29a0cac72a9beeb287049e.tar.gz
Fix the incorrect parameter quota when userdata is formatted with EXT4
The userdata will be formatted by VOLD during bootup when the userdata is not completed file system(EXT4 or F2FS). For EXT4 on userdata and quota feature is enabled. the parameter quota is incorrect in ext4::Format(). Change the parameter from quotatype=prjquota to quotatype=usrquota:grpquota:prjquota. Bug: 199802158 Bug: 211847181 Test: run cts-on-gsi -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest Change-Id: Ibff10e8e67b4e6ffabea97f534ff6551aed91963 Merged-In: Ibff10e8e67b4e6ffabea97f534ff6551aed91963 (cherry picked from commit 3101ac01aca11ab057875d47d87081c4de42c6b6) (cherry picked from commit 344cd3337903c3b5da35df3dc3f15d4badc253a4)
-rw-r--r--fs/Ext4.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/Ext4.cpp b/fs/Ext4.cpp
index 6bc7ad24..7a5f5dab 100644
--- a/fs/Ext4.cpp
+++ b/fs/Ext4.cpp
@@ -198,7 +198,7 @@ status_t Format(const std::string& source, unsigned long numSectors, const std::
cmd.push_back("-E");
std::string extopts = "";
if (needs_casefold) extopts += "encoding=utf8,";
- if (needs_projid) extopts += "quotatype=prjquota,";
+ if (needs_projid) extopts += "quotatype=usrquota:grpquota:prjquota,";
cmd.push_back(extopts);
}