]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r330745:
authorian <ian@FreeBSD.org>
Tue, 20 Mar 2018 21:02:42 +0000 (21:02 +0000)
committerian <ian@FreeBSD.org>
Tue, 20 Mar 2018 21:02:42 +0000 (21:02 +0000)
commitab6014fbc22fa31741e8611b729dd0cfc10d6adb
treec8dff5e3969cc5d895dd78ee33fe675e58797c26
parent19c95250d8b94a6567a649122820decea4966508
MFC r330745:

Make root mount timeout logic work for filesystems other than ufs.

The vfs.mountroot.timeout tunable and .timeout directive in a mount.conf(5)
file allow specifying a wait timeout for the device(s) hosting the root
filesystem to become usable.  The current mechanism for waiting for devices
and detecting their availability can't be used for zfs-hosted filesystems.
See the comment #20 in the PR for some expanded detail on these points.

This change adds retry logic to the actual root filesystem mount.  That is,
insted of relying on device availability using device name lookups, it uses
the kernel_mount() call itself to detect whether the filesystem can be
mounted, and loops until it succeeds or the configured timeout is exceeded.

These changes are based on the patch attached to the PR, but it's rewritten
enough that all mistakes belong to me.

PR: 208882
sys/kern/vfs_mountroot.c