HomeFreeBSD

vfs_mountroot: Check for root dev before waiting

Description

vfs_mountroot: Check for root dev before waiting

If GEOM is idle but the root device is not yet present when we enter
vfs_mountroot_wait_if_necessary, we call vfs_mountroot_wait to wait
for root holds (e.g. CAM or USB initialization). Upon returning from
vfs_mountroot_wait, we wait 100 ms at a time until the root device
shows up.

Since the root device most likely appeared during vfs_mountroot_wait

  • waiting for subsystems which may be responsible for the root

device is the whole purpose of that function -- it makes sense to
check if the device is now present rather than printing a warning
and pausing for 100 ms before checking.

Reviewed by: trasz
Fixes: a3ba3d09c248 Make root mount wait mechanism smarter
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D33593

Details

Provenance
cpercivaAuthored on Dec 20 2021, 5:55 PM
Reviewer
trasz
Differential Revision
D33593: vfs_mountroot: Check for root dev before waiting
Parents
rG19a172158cc1: vfs_mountroot: Wait for GEOM idle post root holds
Branches
Unknown
Tags
Unknown