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.h b/VoldNativeService.h
index 619c720..bd37ac7 100644
--- a/VoldNativeService.h
+++ b/VoldNativeService.h
@@ -107,9 +107,10 @@
binder::Status initUser0();
binder::Status mountFstab(const std::string& blkDevice, const std::string& mountPoint,
bool isZoned, const std::vector<std::string>& userDevices);
+
binder::Status 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);
binder::Status setStorageBindingSeed(const std::vector<uint8_t>& seed);