For UFS filesystems, we don't wait for root holds at all
anymore. Instead, if the device is available, we proceed to mount
root. We wait up to 3 seconds for the device to become available, by
default.
For ZFS, we always wait for the root holds to clear. On systems that
have lots of hard disks, this can be several minutes for some
pathological situations (greater than 15 miniutes has been
observed).
Since the disks that take this long to be discovered or taste are not
typically root, and in fact are typically garbage that we don't want to
use, there's no harm in not waiting for them. Introduce a new
hold_timeout variable in both the mount.conf(5) scripts and globally as
vfs.mountroot.hold_timeout. It defaults to 10 seconds. If these values
are set to 0, no waiting is done. If set to -1, it will wait forever
(which was FreeBSD 14 and earlier behavior, to varying degrees).
We already wait for the root holds to be released, with a 30 second
timeout, in /etc/rc.d in a few spots, so this should dovetail with that
feature nicely.
Sponsored by: Netflix