Page MenuHomeFreeBSD

vfs_mountroot: Check for root dev before waiting
ClosedPublic

Authored by cperciva on Dec 20 2021, 7:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 30, 5:42 PM
Unknown Object (File)
Nov 22 2024, 11:14 AM
Unknown Object (File)
Nov 19 2024, 11:43 PM
Unknown Object (File)
Nov 19 2024, 9:22 PM
Unknown Object (File)
Nov 17 2024, 7:52 AM
Unknown Object (File)
Nov 12 2024, 5:10 PM
Unknown Object (File)
Nov 10 2024, 4:34 AM
Unknown Object (File)
Oct 17 2024, 2:15 PM
Subscribers

Details

Summary

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.

Fixes: a3ba3d09c248 Make root mount wait mechanism smarter
Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable