From nobody Mon Jul 11 12:45:25 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F03C1CF9FE7; Mon, 11 Jul 2022 12:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LhNs201lFz3dM3; Mon, 11 Jul 2022 12:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657543526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QiGpONOvKFcrrA3Sxa12Os4iMjzDuFLnP4FO0KqF4go=; b=iY73n8K2p/ap/SzKeOFuea2wR1mGJPOcbqaQR0Y2cIWhKZi5/K28H3SjO7wh+WPCPc+UDA N4pgdAYWGVbid2xqqP5uQKPh9g9hZBwUEQW/rGIWWUhqmS4HUgYxazPOgGBsMQPOkUv1Cx xcXe0I8iwiFSOC4YnPUmAKJHDhdJgeCS0grinfI2qBN5jNp9h5L173Jrs4WTeKc7QfymDG cdxTrEGxgKd4oYDJAKZffl6UWOF0UxoLmrxOMLiHtS7ytjnhQkyjJeF/ltAOf7wfpVJU9m GwUTiu7mHpih0sWRloYK2k5PBC7VAIj67VvkDfhbRanjhJDxYmGQKES/hS4quw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LhNs165Jyz13f7; Mon, 11 Jul 2022 12:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26BCjP8B016848; Mon, 11 Jul 2022 12:45:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BCjP47016847; Mon, 11 Jul 2022 12:45:25 GMT (envelope-from git) Date: Mon, 11 Jul 2022 12:45:25 GMT Message-Id: <202207111245.26BCjP47016847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mike Karels Subject: git: 5919cf3218d9 - stable/13 - mountd startup: enable NFSv4 if needed on restart List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5919cf3218d988239d14564ba16160d323eda3d4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657543526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QiGpONOvKFcrrA3Sxa12Os4iMjzDuFLnP4FO0KqF4go=; b=AB6LJ/LNZ9me8cM0+iYe4/2SkWe35dMlds8zPDTHrWg1eX1ZbL5NBD2iIIMMqTeSKjFUmU NfN/hsYgb5TwFhvX7aGMSnO/B1KAih4Y4RQBHd4+xALfLZg5N696AYtI3Tgl88eJNzb2FJ 7XVW5Gp096Ay/1KTkkPbKdRoHzLu6O8+orSvJ5eY3PNHk2O1t0WOe5QzSDMZysuF/PtekK AmZEZxWnDipUcsthDGd6tf7gxrKW4da4f/AsmRYZh9UIkv1DbvpbTVnlImEGYXBw0ZUqfo q0VyVi83WiH2RpFqqwqOUd9LKh0F0kaN56dfDbv3Y4YYpbENxkHT2YyIZ03avw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657543526; a=rsa-sha256; cv=none; b=kbYFoMxxKY/+rcMOSFl8Dsaz5GAOv/h9HxAJgBRJOIHzPxUBXuXdaxqi0KC8hx5zQyOJso RDzLtMB6J/YWxb1c964gU/n7gTWv76qB4T5FwPrqM6HIjGciQy3DkiVLRQt6yJcg1yi7eS Xn1l6iGA9ltJlAXVlgzsLJTGSGC21ZPN2z49IuO8eaKJBX9ZgMZFQiaxpBHUK/C4v+xYzB tudozZm0p1nb5xV1+XkBKpNGeJJT8QM1vo1STVdV8LIk5PHDKAqI1UJd9HMBpzEsdMXSU+ 5g/wNDaUy/ab1bNiVoynAP6drXJbmX6N8uMf8qcX7pyt2LkrQCmm4AgOWLTnIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=5919cf3218d988239d14564ba16160d323eda3d4 commit 5919cf3218d988239d14564ba16160d323eda3d4 Author: Mike Karels AuthorDate: 2022-07-03 23:04:41 +0000 Commit: Mike Karels CommitDate: 2022-07-11 12:43:58 +0000 mountd startup: enable NFSv4 if needed on restart The mountd script in rc.d sets vfs.nfsd.server_max_nfsvers correctly when it is run at system startup, relying on the kernel default. However, if NFSv4 was enabled in /etc/rc.conf later, and the script was re-run to restart mountd, the sysctl was still set to 3. Set the sysctl to the right value in all cases. Reviewed by: rmacklem (cherry picked from commit 1cf8e6339e9add47107a6c9988a0f509225b7ef6) --- libexec/rc/rc.d/mountd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/mountd b/libexec/rc/rc.d/mountd index 0c6e75f07d64..d75416736245 100755 --- a/libexec/rc/rc.d/mountd +++ b/libexec/rc/rc.d/mountd @@ -34,7 +34,9 @@ mountd_precmd() rc_flags="${rc_flags} -R" else force_depend rpcbind || return 1 - if ! checkyesno nfsv4_server_enable; then + if checkyesno nfsv4_server_enable; then + sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null + else sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null fi fi