vfs_mountroot: Skip 'Root mount waiting' < 1 s

While the message is technically correct, it's not particularly
helpful in the case where we're only waiting a few ms; this case
occurs frequently on EC2 arm64 instances with CAM initialization
racing to release its root hold before vfs_mountroot reaches this
point.  Only print the message if we end up waiting for more than
one second.

Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D33591
This commit is contained in:
Colin Percival 2021-12-20 07:17:25 -08:00
parent ca457394fc
commit e6db5eb9ec

View file

@ -986,6 +986,7 @@ vfs_mountroot_wait(void)
curfail = 0;
lastfail.tv_sec = 0;
ppsratecheck(&lastfail, &curfail, 1);
while (1) {
g_waitidle();
mtx_lock(&root_holds_mtx);