git: f72926eab00c - main - mountd: Delay starting mountd until after mountlate

From: Rick Macklem <rmacklem_at_FreeBSD.org>
Date: Sun, 23 Jan 2022 22:18:38 UTC
The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=f72926eab00ccd956298e44831b519daa704a868

commit f72926eab00ccd956298e44831b519daa704a868
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2022-01-23 22:17:40 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2022-01-23 22:17:40 +0000

    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
---
 libexec/rc/rc.d/lockd  | 2 +-
 libexec/rc/rc.d/mountd | 2 +-
 libexec/rc/rc.d/statd  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libexec/rc/rc.d/lockd b/libexec/rc/rc.d/lockd
index 565ba35164eb..894b3c136690 100755
--- a/libexec/rc/rc.d/lockd
+++ b/libexec/rc/rc.d/lockd
@@ -5,7 +5,7 @@
 #
 
 # PROVIDE: lockd
-# REQUIRE: nfsclient nfsd rpcbind statd
+# REQUIRE: nfsclient rpcbind statd
 # BEFORE:  DAEMON
 # KEYWORD: nojail shutdown
 
diff --git a/libexec/rc/rc.d/mountd b/libexec/rc/rc.d/mountd
index ba573ad732cc..0c6e75f07d64 100755
--- a/libexec/rc/rc.d/mountd
+++ b/libexec/rc/rc.d/mountd
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: mountd
-# REQUIRE: NETWORKING rpcbind quota
+# REQUIRE: NETWORKING rpcbind quota mountlate
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr
diff --git a/libexec/rc/rc.d/statd b/libexec/rc/rc.d/statd
index 2ff8d45ffde9..e1150c67a16f 100755
--- a/libexec/rc/rc.d/statd
+++ b/libexec/rc/rc.d/statd
@@ -5,7 +5,7 @@
 #
 
 # PROVIDE: statd
-# REQUIRE: nfsclient nfsd rpcbind
+# REQUIRE: nfsclient rpcbind
 # BEFORE:  DAEMON
 # KEYWORD: nojail shutdown