Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfd7b88f authored by Ashok Mutyala's avatar Ashok Mutyala
Browse files

Add length parameter to format /data



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

Signed-off-by: default avatarAshok Mutyala <quic_amutyala@quicinc.com>
Change-Id: Ifce4b78df5edb899c84a032004895802766cd5cf
parent 2d4d60cc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1556,6 +1556,7 @@ MountAllResult fs_mgr_mount_all(Fstab* fstab, int mount_mode) {
                                   attempted_entry.mount_point, wiped ? "true" : "false",
                                   attempted_entry.fs_type,
                                   attempted_entry.fs_mgr_flags.is_zoned ? "true" : "false",
                                   std::to_string(attempted_entry.length),
                                   android::base::Join(attempted_entry.user_devices, ' ')},
                                  nullptr)) {
                        LERROR << "Encryption failed";
@@ -1601,6 +1602,7 @@ MountAllResult fs_mgr_mount_all(Fstab* fstab, int mount_mode) {
                               current_entry.mount_point, "true" /* shouldFormat */,
                               current_entry.fs_type,
                               current_entry.fs_mgr_flags.is_zoned ? "true" : "false",
                               std::to_string(current_entry.length),
                               android::base::Join(current_entry.user_devices, ' ')},
                              nullptr)) {
                    LERROR << "Encryption failed";