From nobody Fri Jun 10 22:22:40 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 2C5B483C7C8; Fri, 10 Jun 2022 22:22:41 +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 4LKb7P0kstz3mmt; Fri, 10 Jun 2022 22:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654899761; 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=iFYPIcfY84AlEi4jkXJ26uQCJw7j/l9QkCv4YHiir/I=; b=mUDFx2Meld7HmfzEf2gXoDbyPizzbKWCaoQiNKbgjdtLvOkn5NbBsf/rX9DKhMBkLDYJL1 SqB/xI78RDR72q24gOhslGSgbS6Dh/xlyS9CpIl/89jiNu9aHKM8Y2AlAQt88cK5QHgTom zjwuo4DaqIaHKe5rgfIV0cyxQpXt8yxIla0ZvlpW3Hb1cHW4OMZ4Q2ujKnt7VcQ8VTgsTO lMmp61DcnxPmFq201/IwGeXpy5c2qvBYsEUFCaS2NeyKJpWT1N5n6AWB88r53aiUbEqG1J KWjDsrx/iHuWDUiZ0GJpYlBjzkJSnz/dDlhfsj+kI0molb9FuhQO5gXl7DuJLQ== 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 ED72220F28; Fri, 10 Jun 2022 22:22:40 +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 25AMMeAL026538; Fri, 10 Jun 2022 22:22:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25AMMeFh026537; Fri, 10 Jun 2022 22:22:40 GMT (envelope-from git) Date: Fri, 10 Jun 2022 22:22:40 GMT Message-Id: <202206102222.25AMMeFh026537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 594821872f8b - stable/12 - nfscl: Do not handle NFSERR_BADSESSION in operation code 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 594821872f8b9db005724a1a298b7502c39cb99e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654899761; 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=iFYPIcfY84AlEi4jkXJ26uQCJw7j/l9QkCv4YHiir/I=; b=FhztaDQwkWFsrjDxf/BR9Uk/QmofAxL5yi+DOrJPCE5zmKXBg5cjCNJQ2dxPhd9Lw/UeTz 2J9z+1YBd3SWklyqqGCIEyOjrN0M0i70YVQ2gPzp6DklYtWR/ynS+5hFZWFUJ95cfb7qBu 2kvMoPj8pvzwGGCJeDhQJdeZCS75zLWzKcQ9bEGJX9pMAuFLNqUVqAJDRlhoFjeKl7On9n Je9uOsXlkd+kEMbQ/942IzVP2EjJ4jv/dIDBigR0FTvhR0FZ/yYvyUCFnn3lPWJ9GQzy00 SDs61BSaiQ3Pc4qfM5m0ivcy0PvxPB30Lo4/dERgprIsyfTl7I+4LgkR+Vux1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654899761; a=rsa-sha256; cv=none; b=wkW/Nynd+BcyfS5mO3dJ63MLje8ZHrlYfdFuywWkF5NJ7/e66DpH6fM6fRtf+q12Qg+IR0 WM1UgS7ObyeOSjqHuXh52uSxQf9LqaFl2b80R2x7hedZ2zrhJBNVqr0TtgYrdoyTMXldgw n3mF64kGJSt/O43hC4853b827WR8hjZrsGmGaKvX47qmMfBFGaHDH6JOrLpB0fYa20prl/ 9nZ4j87va22J4pYfnMP1nLrgbJL5WklQAPpQqNFoHEYrDXlzHmyNd+y7vdKheZOGRJaYAx 7EkD6mScWvW5FPSQ19LoDxcrk6j7sIRAJhKumndc8fuNR0kWaRzi4UAgmjk3Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=594821872f8b9db005724a1a298b7502c39cb99e commit 594821872f8b9db005724a1a298b7502c39cb99e Author: Rick Macklem AuthorDate: 2022-05-27 21:20:31 +0000 Commit: Rick Macklem CommitDate: 2022-06-10 22:21:47 +0000 nfscl: Do not handle NFSERR_BADSESSION in operation code The NFSERR_BADSESSION reply from a NFSv4.1/4.2 server is handled by newnfs_request(). It should not be handled separately after newnfs_request() has returned. These two cases were spotted during code inspection. One of them should only redo what newnfs_request() already did by the same "nfscl" thread. The other might have resulted in recovery being done twice, but the code is only used for "pnfs" mounts, so that would be rare. Also, since NFSERR_BADSESSION should only be replied by a server after the server reboots, this would be extremely rare. (cherry picked from commit 425e5c739bcf190265330b79e85f89eb4d7b5f25) --- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- sys/fs/nfsclient/nfs_clstate.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index a11a1474207c..01b8eda2e441 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -7610,7 +7610,7 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap, } if (nd->nd_repstat != 0 && error == 0) error = nd->nd_repstat; - if (error == NFSERR_STALECLIENTID || error == NFSERR_BADSESSION) + if (error == NFSERR_STALECLIENTID) nfscl_initiate_recovery(owp->nfsow_clp); nfsmout: NFSCL_DEBUG(4, "eo nfsrpc_createlayout err=%d\n", error); diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index da43c883cbe5..388529c8047a 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -2659,8 +2659,7 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T *p) error = nfsrpc_renew(clp, NULL, cred, p); if (error == NFSERR_CBPATHDOWN) cbpathdown = 1; - else if (error == NFSERR_STALECLIENTID || - error == NFSERR_BADSESSION) { + else if (error == NFSERR_STALECLIENTID) { NFSLOCKCLSTATE(); clp->nfsc_flags |= NFSCLFLAGS_RECOVER; NFSUNLOCKCLSTATE();