Merge "Adding wait for a device file before mount" am: bd742a15ab

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322740

Change-Id: I518ff8a0178fda94457805240aa9c0b1fbf3c50a
This commit is contained in:
Tom Cherry 2020-06-09 16:52:21 +00:00 committed by Automerger Merge Worker
commit d5401ddf61

View file

@ -1756,6 +1756,11 @@ int fs_mgr_remount_userdata_into_checkpointing(Fstab* fstab) {
// wrapper to __mount() and expects a fully prepared fstab_rec,
// unlike fs_mgr_do_mount which does more things with avb / verity etc.
int fs_mgr_do_mount_one(const FstabEntry& entry, const std::string& mount_point) {
// First check the filesystem if requested.
if (entry.fs_mgr_flags.wait && !WaitForFile(entry.blk_device, 20s)) {
LERROR << "Skipping mounting '" << entry.blk_device << "'";
}
// Run fsck if needed
prepare_fs_for_mount(entry.blk_device, entry);