Add length parameter to format /data f2fs filesystem

With metadata encryption, if partition is wiped (or) cryptfs failed ,
it will do format without length which make partition size is grown
large to occupy remaining space instead of restricting the Android
defined partition size.

Bug: 343159184
Test: Add length flag in fstab && fastboot erase userdata &&
      fastboot reboot && df -h /data

Change-Id: Iad041e960c9337ab1b9d51b115db3c5f3f1f75e2
Signed-off-by: Ashok Mutyala <quic_amutyala@quicinc.com>
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index a70639c..98dec66 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -594,18 +594,19 @@
     ACQUIRE_LOCK;
 
     return translateBool(fscrypt_mount_metadata_encrypted(blkDevice, mountPoint, false, false,
-                                                          "null", isZoned, userDevices));
+                                                          "null", isZoned, userDevices, 0));
 }
 
 binder::Status VoldNativeService::encryptFstab(const std::string& blkDevice,
                                                const std::string& mountPoint, bool shouldFormat,
                                                const std::string& fsType, bool isZoned,
-                                               const std::vector<std::string>& userDevices) {
+                                               const std::vector<std::string>& userDevices,
+                                               int64_t length) {
     ENFORCE_SYSTEM_OR_ROOT;
     ACQUIRE_LOCK;
 
     return translateBool(fscrypt_mount_metadata_encrypted(blkDevice, mountPoint, true, shouldFormat,
-                                                          fsType, isZoned, userDevices));
+                                                          fsType, isZoned, userDevices, length));
 }
 
 binder::Status VoldNativeService::setStorageBindingSeed(const std::vector<uint8_t>& seed) {