HomeFreeBSD

mountd: Delay starting mountd until after mountlate

Description

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
Differential Revision: https://reviews.freebsd.org/D33256
MFC after: 3 months

Details

Provenance
rmacklemAuthored on Jan 23 2022, 10:17 PM
Differential Revision
D33256: Modify the rc scripts so that mountd starts after mountlate
Parents
rG45f0e5710509: sound: add patch for Lenovo Legion 5 AMD
Branches
Unknown
Tags
Unknown