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/MetadataCrypt.h b/MetadataCrypt.h
index 2c07a14..a091443 100644
--- a/MetadataCrypt.h
+++ b/MetadataCrypt.h
@@ -29,7 +29,7 @@
bool fscrypt_mount_metadata_encrypted(const std::string& block_device,
const std::string& mount_point, bool needs_encrypt,
bool should_format, const std::string& fs_type, bool is_zoned,
- const std::vector<std::string>& user_devices);
+ const std::vector<std::string>& user_devices, int64_t length);
bool defaultkey_volume_keygen(KeyGeneration* gen);