From 3101ac01aca11ab057875d47d87081c4de42c6b6 Mon Sep 17 00:00:00 2001 From: "lin.gui" Date: Mon, 13 Sep 2021 16:37:01 +0800 Subject: [PATCH] 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 Test: run cts-on-gsi -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest Change-Id: Ibff10e8e67b4e6ffabea97f534ff6551aed91963 --- fs/Ext4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/Ext4.cpp b/fs/Ext4.cpp index 6bc7ad2..7a5f5da 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); }