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/fs/F2fs.h b/fs/F2fs.h
index a0218f2..7391310 100644
--- a/fs/F2fs.h
+++ b/fs/F2fs.h
@@ -31,7 +31,7 @@
status_t Check(const std::string& source);
status_t Mount(const std::string& source, const std::string& target);
status_t Format(const std::string& source, const bool is_zoned,
- const std::vector<std::string>& user_devices);
+ const std::vector<std::string>& user_devices, int64_t length = 0);
} // namespace f2fs
} // namespace vold