]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make root mount timeout logic work for filesystems other than ufs.
authorian <ian@FreeBSD.org>
Sat, 10 Mar 2018 22:07:57 +0000 (22:07 +0000)
committerian <ian@FreeBSD.org>
Sat, 10 Mar 2018 22:07:57 +0000 (22:07 +0000)
commit8b0ba03b3f1cac5af6ad38a5cb1c14dfd7c72bfb
tree57e15abfa4a8a21bd2e230a58cdd88701d077089
parente25476465d38ee40ac766c43e81d7d5a9bd7dd8e
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
X-MFC after: sufficient testing, and hopefully in time for 11.1
sys/kern/vfs_mountroot.c