Merge "Adding wait for a device file before mount" into rvc-dev

This commit is contained in:
Tom Cherry 2020-06-09 21:26:50 +00:00 committed by Android (Google) Code Review
commit fa94467894
1 changed files with 5 additions and 0 deletions

View File

@ -1777,6 +1777,11 @@ int fs_mgr_remount_userdata_into_checkpointing(Fstab* fstab) {
// wrapper to __mount() and expects a fully prepared fstab_rec, // wrapper to __mount() and expects a fully prepared fstab_rec,
// unlike fs_mgr_do_mount which does more things with avb / verity etc. // 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) { 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 // Run fsck if needed
prepare_fs_for_mount(entry.blk_device, entry); prepare_fs_for_mount(entry.blk_device, entry);