History log of /freebsd-10-stable/sys/kern/vfs_mountroot.c
Revision Date Author Comments
# 331276 20-Mar-2018 ian

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


# 302234 27-Jun-2016 bdrewery

MFC r298819:

sys/kern: spelling fixes in comments.


# 293743 12-Jan-2016 trasz

MFC r287964:

Kernel part of reroot support - a way to change rootfs without reboot.

Note that the mountlist manipulations are somewhat fragile, and not very
pretty. The reason for this is to avoid changing vfs_mountroot(), which
is (obviously) rather mission-critical, but not very well documented,
and thus hard to test properly. It might be possible to rework it to use
its own simple root mount mechanism instead of vfs_mountroot().

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2698


# 293742 12-Jan-2016 trasz

MFC r287107:

Make vfs_unmountall() unmount /dev after /, not before. The only
reason this didn't result in an unclean shutdown is that devfs ignores
MNT_FORCE flag.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3467


# 288400 29-Sep-2015 bdrewery

MFC r288091:

vfs_mountroot_shuffle() never returns non-zero.


# 267752 22-Jun-2014 mav

MFC r267351:
Move root_mount_hold() functionality to separate mutex.

It has nothing to share with mutex protecting list of mounted file systems.


# 259990 28-Dec-2013 dim

MFC r259892:

In sys/kern/vfs_mountroot.c, remove static function parse_isspace(),
which is unused since r214006.


# 288400 29-Sep-2015 bdrewery

MFC r288091:

vfs_mountroot_shuffle() never returns non-zero.


# 267752 22-Jun-2014 mav

MFC r267351:
Move root_mount_hold() functionality to separate mutex.

It has nothing to share with mutex protecting list of mounted file systems.


# 259990 28-Dec-2013 dim

MFC r259892:

In sys/kern/vfs_mountroot.c, remove static function parse_isspace(),
which is unused since r214006.