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
diff --git a/fs/F2fs.cpp b/fs/F2fs.cpp
index 9517dc9..ee39f2b 100644
--- a/fs/F2fs.cpp
+++ b/fs/F2fs.cpp
@@ -89,6 +89,19 @@
     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);
 }