Remove timout logic in waiting vold.post_fs_data_done
This code should not be timing out, since it has no graceful way to recover. Bug: 62308812 Test: marlin boot Change-Id: I1284f9a34e83e6451622a702d2bee40b08877db2
This commit is contained in:
parent
e4775fdbca
commit
42e3810e13
1 changed files with 9 additions and 18 deletions
27
cryptfs.cpp
27
cryptfs.cpp
|
@ -1302,29 +1302,24 @@ int wait_and_unmount(const char *mountpoint, bool kill)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int prep_data_fs(void)
|
static void prep_data_fs(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
// NOTE: post_fs_data results in init calling back around to vold, so all
|
// NOTE: post_fs_data results in init calling back around to vold, so all
|
||||||
// callers to this method must be async
|
// callers to this method must be async
|
||||||
|
|
||||||
/* Do the prep of the /data filesystem */
|
/* Do the prep of the /data filesystem */
|
||||||
property_set("vold.post_fs_data_done", "0");
|
property_set("vold.post_fs_data_done", "0");
|
||||||
property_set("vold.decrypt", "trigger_post_fs_data");
|
property_set("vold.decrypt", "trigger_post_fs_data");
|
||||||
SLOGD("Just triggered post_fs_data\n");
|
SLOGD("Just triggered post_fs_data");
|
||||||
|
|
||||||
/* Wait a max of 50 seconds, hopefully it takes much less */
|
/* Wait a max of 50 seconds, hopefully it takes much less */
|
||||||
if (!android::base::WaitForProperty("vold.post_fs_data_done",
|
while (!android::base::WaitForProperty("vold.post_fs_data_done",
|
||||||
"1",
|
"1",
|
||||||
std::chrono::seconds(50))) {
|
std::chrono::seconds(15))) {
|
||||||
/* Ugh, we failed to prep /data in time. Bail. */
|
/* We timed out to prep /data in time. Continue wait. */
|
||||||
SLOGE("post_fs_data timed out!\n");
|
SLOGE("waited 15s for vold.post_fs_data_done, still waiting...");
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
SLOGD("post_fs_data done\n");
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
SLOGD("post_fs_data done");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cryptfs_set_corrupt()
|
static void cryptfs_set_corrupt()
|
||||||
|
@ -1475,9 +1470,7 @@ static int cryptfs_restart_internal(int restart_main)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create necessary paths on /data */
|
/* Create necessary paths on /data */
|
||||||
if (prep_data_fs()) {
|
prep_data_fs();
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
property_set("vold.decrypt", "trigger_load_persist_props");
|
property_set("vold.decrypt", "trigger_load_persist_props");
|
||||||
|
|
||||||
/* startup service classes main and late_start */
|
/* startup service classes main and late_start */
|
||||||
|
@ -2216,9 +2209,7 @@ int cryptfs_enable_internal(char *howarg, int crypt_type, const char *passwd,
|
||||||
|
|
||||||
/* restart the framework. */
|
/* restart the framework. */
|
||||||
/* Create necessary paths on /data */
|
/* Create necessary paths on /data */
|
||||||
if (prep_data_fs()) {
|
prep_data_fs();
|
||||||
goto error_shutting_down;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ugh, shutting down the framework is not synchronous, so until it
|
/* Ugh, shutting down the framework is not synchronous, so until it
|
||||||
* can be fixed, this horrible hack will wait a moment for it all to
|
* can be fixed, this horrible hack will wait a moment for it all to
|
||||||
|
|
Loading…
Reference in a new issue