From nobody Fri May 27 21:21:36 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 586421B3DE08; Fri, 27 May 2022 21:21:37 +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 4L8yRP1Zj9z3Nt5; Fri, 27 May 2022 21:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653686497; 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=9mbLNDV0I/1wZeyQrTudLMZd88ZPCy0VfWg0sgm61Jc=; b=p78H/MzPnhnExDs+WZLjtd5Yhn+Jde0HopI8L3CO8vUnUAiKcpt48b+28379RUkqPxV1M4 8RFrf/kI0SjEmG4Iw52Wq3NKtlWC6jJ+6UPMgAjCeR5XVQryQ904lbJOIHv+XK2oemE6Pl KM0bMK+p0uR/VTy+ZJAKGJD9np/LuHol/EjZDdjtRXoT9b72tNw3MeqffFhRbFL5UopA8k CMBIGlA5bf8iCtu98UdXdqIRIKNgjn4e6iXPUZKFpSPmKNLWZ/fR2EWQNvVGEYKsb4xpNt YR2+nkNrPLXXtQGMqf7Wfry5oFmokZbPtz3Bo8wEyIGbyJeH1+eTd7t0PEsdsA== 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 1631B29C5E; Fri, 27 May 2022 21:21:37 +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 24RLLa4f002206; Fri, 27 May 2022 21:21:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24RLLaiW002205; Fri, 27 May 2022 21:21:36 GMT (envelope-from git) Date: Fri, 27 May 2022 21:21:36 GMT Message-Id: <202205272121.24RLLaiW002205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 425e5c739bcf - main - 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/main X-Git-Reftype: branch X-Git-Commit: 425e5c739bcf190265330b79e85f89eb4d7b5f25 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653686497; 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=9mbLNDV0I/1wZeyQrTudLMZd88ZPCy0VfWg0sgm61Jc=; b=aY5jnku8XA8mXria4XQicLpa0COJ12BfasB0nprvdlLwbrTyj87LClESp5/d8powA568EN 7yYUVFE3WHYf/C+RdvmjLG2ve05v/5njLr5YUO+Is9mQuWZDu7eDOFmY/KjiP5iSASbFUU 6uTSGcsZ1ps5ar37MoqCEVybvfGYqP+ndtxrsNKSDKIz4PcrurcHTn2g5++dyM/h6AMqVJ BZIJRbuZeTgVr24qyqETEbU6Z8nGlB6h8mfCRNwec6wnNj6uEfW2NluF2g1mwqfSwfBrDi MZ+XxE3Yoo3Ez+xRYNH4CVuHkM56+tBqczAuoe7AVKIjXtwz0GTt+exEw3OJGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653686497; a=rsa-sha256; cv=none; b=h3MhJzu1Rp/vsTXuUO0+y5IX4RXrnGOA5UGd/GD5QPVfQ+bVwa+DElrZa0IVyBPS5pW/kL cPaUQStAOxCpuRfNcyom87jCLKTn1SrcCVQbXs3Di8XcMEHvqpjkGihJFW7+w+3H5kZP4p YLzGHD4ln/RpbYtmYWMfcUuOh0c4HoSsDL51D4mUYgJkgeMJygjNtLKgA38ocxq0tostWE a+Fxz3Tdm/MI0r1XEAIaYZbDXstRjprkh99ZT4voag6bgW16PR1dxgoA36Dzz7bq/ndhl2 3saBIVvYMjwGnbsv6wpY46KspAG4MMdE/YOV7D4m30pnDlS3jJZc6FkEU3/agg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=425e5c739bcf190265330b79e85f89eb4d7b5f25 commit 425e5c739bcf190265330b79e85f89eb4d7b5f25 Author: Rick Macklem AuthorDate: 2022-05-27 21:20:31 +0000 Commit: Rick Macklem CommitDate: 2022-05-27 21:20:31 +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. MFC after: 2 weeks --- 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 83ce96107ecc..b1d3ee423194 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -8355,7 +8355,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 7ee98aa901d8..3b65828d5958 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -2765,8 +2765,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();