Add quota / casefold options to f2fs if needed.
These were only added for ext4. Bug: 150935323 Test: when creating a private f2fs volume, things work as expected. Change-Id: I11ee04bfddecb6c95e223e66c9bf532c425e6fac
This commit is contained in:
parent
cbd458bb35
commit
2f1c983240
1 changed files with 13 additions and 0 deletions
13
fs/F2fs.cpp
13
fs/F2fs.cpp
|
@ -89,6 +89,19 @@ status_t Format(const std::string& source) {
|
|||
cmd.push_back("-O");
|
||||
cmd.push_back("verity");
|
||||
|
||||
const bool needs_casefold =
|
||||
android::base::GetBoolProperty("ro.emulated_storage.casefold", false);
|
||||
const bool needs_projid = android::base::GetBoolProperty("ro.emulated_storage.projid", false);
|
||||
if (needs_projid) {
|
||||
cmd.push_back("-O");
|
||||
cmd.push_back("project_quota,extra_attr");
|
||||
}
|
||||
if (needs_casefold) {
|
||||
cmd.push_back("-O");
|
||||
cmd.push_back("casefold");
|
||||
cmd.push_back("-C");
|
||||
cmd.push_back("utf8");
|
||||
}
|
||||
cmd.push_back(source);
|
||||
return ForkExecvp(cmd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue