]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mountd: Delay starting mountd until after mountlate
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 23 Jan 2022 22:17:40 +0000 (14:17 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Sat, 23 Apr 2022 22:21:45 +0000 (15:21 -0700)
commit92ecb030d2547a95956b3a6e5240e895ad4eed4e
treecd96f72facb31bf550ce0f739cf9683c4bf5f250
parentd685aeacce8cb0739d1fd978310dd98adfe7d276
mountd: Delay starting mountd until after mountlate

PR#254282 reports a problem where nullfs mounts cannot be
exported via mountd for FreeBSD 13.0.

The problem seems to be that, to do the nullfs mounts in
/etc/fstab, they require the "late" mount option, so that the
underlying filesystem is mounted (ZFS for the PR).

Adding "mountlate" to the REQUIRE list in /etc/rc.d/mountd
fixes the problem, but that results in a dependency cycle
because /etc/rc.d/lockd specifies:

REQUIRE: nfsd
BEFORE: DAEMON
--> which forces mountd to preceed DAEMON.

This patch removes "nfsd" from REQUIRE for lockd and statd,
then adds mountlate to REQUIRE for mountd, to fix this
problem.  Having lockd REQUIRE nfsd was done in the NetBSD
code when it was pulled into FreeBSD and there does not
seem to be a need for this.

In case this causes problems, a long MFC has been specified.

PR: 254282
(cherry picked from commit f72926eab00ccd956298e44831b519daa704a868)
libexec/rc/rc.d/lockd
libexec/rc/rc.d/mountd
libexec/rc/rc.d/statd