From nobody Mon Jul 11 23:53:12 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 1E81517FDCAE; Mon, 11 Jul 2022 23:53:13 +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 4LhggY0LDmz3JNP; Mon, 11 Jul 2022 23:53:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657583593; 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=pH+oFWn13e/Gge3DlzkdzIn3NzisAXl5qiDV6XhnpUw=; b=OoGKPnJpa2SUh3h6AuspE1WMcW8+Cz4BklLa+ZSU5fsFwF0lmbisL6CUKg+SuPG+DpRb2T AHFPmhr52Ge8Fso+SFh5iUDBFVzg3B1cxaYPRDhQ66CyZGk0OvoiVxzjvDN4jO6UfY8U20 OEO2d0jSerXKmCcG6cerLWPt/cz1lT8QvKyG6iYhxfCAEfPXLdUCZq28hapuedDJNM5MrX a4cbDWVzlS9EDoEuCBN1Sw81FcfI4EZTDronhuYcyP4RDWqHgXkoP6DNC3AUO+eYWaKgVG y5anNZG/iDPzJWK3PygPYfCLl7iHnUY0AgqTNTiuTJ4o9QoMRWrXxo5CgiHp2Q== 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 4LhggX6Sl0zNQ3; Mon, 11 Jul 2022 23:53:12 +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 26BNrCPw028879; Mon, 11 Jul 2022 23:53:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BNrCTg028878; Mon, 11 Jul 2022 23:53:12 GMT (envelope-from git) Date: Mon, 11 Jul 2022 23:53:12 GMT Message-Id: <202207112353.26BNrCTg028878@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: d4a11b3e3bdd - main - nfscl: Fix CreateSession for an established ClientID 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: d4a11b3e3bddb1fa3bdd101e12aea6f5937356fa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657583593; 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=pH+oFWn13e/Gge3DlzkdzIn3NzisAXl5qiDV6XhnpUw=; b=yAVsXsGTXhMdRip6lKE9dFEOsenkntMCcbdAn/BePxRFc2Vt5jXIIct8wavN99tnp4VluT LFgNtdWYCxG8zbgaODONFrafNPzLElH53ZPbqt02Q6OVRdaGRtkFXm8dN+EGgYI3gKXrbv yFo58eg7uzhmFK/N+lzU/he1W9w5ev4A23Q1bL6LGmZoO3N6Db1e9mLKWCapDws4MWUXV9 MFBqdihOgF3tyySa9RDDGeL6gfCd5B9R81uB8VZuUU+6qJFRAcO29A/DZwcCTcUxQzHhZR ufin7O37/xqpYVx8DMpjgQfoFUSHBePO0i8VF4x0Mh3WWiNsYX3AG/DHQxkD7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657583593; a=rsa-sha256; cv=none; b=yeTACjL4I2nTLw14oE+68UrjtB512s3IH2Z9SWOwUwUrMjzCHpGF5gd3XLSZjpIRbQuNt1 7NbWgrlvi+MMJEH58h4ic+y0PELIehcpCQ+Mf3KhnKRpeyR7QrHl9V8O5l1M93LhSzkCPV 9EMCEGgTQFHSb1omhCdzKhUhkqSVEv3ogseVH6hGBkIjO0G0R7c88qQAUFBwKpdRz/CJJl pNm1ddaqXP8MQ0UjYqruSbQp4ZhzyM/rk1HzaUWyoEh/xPotOdGqJKFDyxlXideIFta4GD CXJWCJoVnsSyg3fLgyOi/VeskgmN/cTb+8fDPbeLeOcEAfcclJHJsf99ptQUIQ== 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=d4a11b3e3bddb1fa3bdd101e12aea6f5937356fa commit d4a11b3e3bddb1fa3bdd101e12aea6f5937356fa Author: Rick Macklem AuthorDate: 2022-07-11 23:50:34 +0000 Commit: Rick Macklem CommitDate: 2022-07-11 23:50:34 +0000 nfscl: Fix CreateSession for an established ClientID Commit 981ef32230b2 added optional use of the session slots marked bad to recover a new session when all slots are marked bad. The recovery worked against a FreeBSD NFSv4.1/4.2 server, but not a Linux one. It turns out that it was a bug in the FreeBSD client and not the Linux server. This patch fixes the client so that DeleteSession followed by CreateSession after receiving a NFSERR_BADSESSION error reply works against the Linux server (and conforms to the RFC). This also implies that the FreeBSD NFSv4.1/4.2 server needs to be fixed in a future commit. Without the fix, the FreeBSD server does a full recovery, including creation of a new ClientID, but since "intr" mounts were broken, this does not result in a regression. This patch only affects the case where a CreateSession is done for an already confirmed ClientID, which was not being done prior to commit 981ef32230b2. PR: 260011 MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 051942d84d4d..a26345cb362f 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -984,7 +984,7 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim, dsp->nfsclds_sess.nfsess_clientid = odsp->nfsclds_sess.nfsess_clientid; dsp->nfsclds_sess.nfsess_sequenceid = - odsp->nfsclds_sess.nfsess_sequenceid; + odsp->nfsclds_sess.nfsess_sequenceid + 1; dsp->nfsclds_flags = odsp->nfsclds_flags; if (dsp->nfsclds_servownlen > 0) memcpy(dsp->nfsclds_serverown,