From nobody Mon Jul 11 12:45:32 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 A15051CFA21D; Mon, 11 Jul 2022 12:45:33 +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 4LhNs90Fmlz3dRm; Mon, 11 Jul 2022 12:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657543533; 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=+W7cjvWNfs0i0kL5UfJ4CAFIsK/yraYHU/TWS6Gt2v4=; b=suf3XrPA+66RofxT19chBviHnJy6pXCjgGtx1Rx+y8kAMJIf47/Nl503mygJ8JAQSo7A0d 1DbQuwMqdYsAtJHgDR5A2AhfAGPvhWkYesLqrBx9Ah+ZD6dJ+65GMIc4H+aVKGhuzgcV11 xXeVMrnrFRPED9DuHOsBLhhESQq/h/kDNZLwciNl002nb8AXY50iovfung9Zz6Aqo3wJ6c lWFckFiXa7KIu62w3MDYYk0/n+r2A++Qnw5RfaEE+euWhy+jtIjEAVMKt/XNqwHeVTDUQ2 0EdGGFeDOXN4BN3o0DNrDBo+U6Sl0/1jyJ8/5w3cIyoFv4f2wWQ7X0gxsZ/+FA== 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 4LhNs86SWdz14F6; Mon, 11 Jul 2022 12:45:32 +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 26BCjWT7016969; Mon, 11 Jul 2022 12:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BCjWaj016968; Mon, 11 Jul 2022 12:45:32 GMT (envelope-from git) Date: Mon, 11 Jul 2022 12:45:32 GMT Message-Id: <202207111245.26BCjWaj016968@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: 1668ea8284b2 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 1668ea8284b230b15fc8f096fe2110ef3546f933 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657543533; 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=+W7cjvWNfs0i0kL5UfJ4CAFIsK/yraYHU/TWS6Gt2v4=; b=nXlKTTZ8ZEBfYnApiFLOHJHnCQ1bDMxuyHhhCt6sFovH91x8Qmtd4k1dDhVqadyW/bl+cS PQx/reAIjLDDD4Th/AejbnG9Tg3G+UK8IbEjvVnpkOsJ2DzfcmXmvs1yXQvuDLnKvkICgw qh5o3KkEx/X0yI95nukOp61SDRJZV+Eqa8tjKCF0Nk75OuVUzZt/4+fZ02RSRiQOBPm3NW 9xqJwmF5zaZqAzXHC9bcNb2HLP4MmbRHH0rppQ9dgkTC0g01VnVsJaa8FoWlIAeZgUjS5x Fu42RFyK8ZNjNDGYd13TdsT7mKSxfR+y3UrIIm5qKhmu3W9CKY8VBMU+qiRhTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657543533; a=rsa-sha256; cv=none; b=Z1uuLUw/NiJudqCtapHR+ZjRdR4iAuTqV/qZUfpvTcJp9XpOrFRgdG7B2HN/Gbitnm20o7 fVQJBTBMhdPW0sUwtHnQgaQM6n7FWJz0DTUNkahNphNShK9eGfjG93hyjYNAQa81dUuJh9 2VSuaBc5wbcqQJ9F7n4Z9qmF5eyG5MQd2rZqDIC7TBaBxXJlRRii9RJsoBk6CX7TIwPb2A /5Y6pYb14dAFz5B14dKtgXCM1SywHGdw97wxELlfvHYcKdEP8mqllHJcsUyJDgJ2O/emQW hHCTDhqvoaQkSvak3zlc77gQbbOvfXQg37N9QblyLtgIpH7Jh++m8ufmL1QREw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=1668ea8284b230b15fc8f096fe2110ef3546f933 commit 1668ea8284b230b15fc8f096fe2110ef3546f933 Author: Mike Karels AuthorDate: 2022-07-03 23:04:41 +0000 Commit: Mike Karels CommitDate: 2022-07-11 12:45:02 +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 ba573ad732cc..2ee61e7c4884 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