From nobody Thu Jul 28 20:22:21 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 4Lv2BP5vT8z4XpDH; Thu, 28 Jul 2022 20:22:21 +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 4Lv2BP3zcjz3mXY; Thu, 28 Jul 2022 20:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659039741; 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=4b2BECz3qK1/66Bu1AKrfI4jihJMzZYQ8C4DxuUG7U4=; b=OT0cNzuJlYRbkTRouJlh3afUfQwRy62UsyyunsjiYRGCaHPSQJM5EhurOxvXQkgLRdae+8 h/+87/+TMwGY0X2I+VRH0xCff3WAxXF3hPyIl640Pt4pNLKC1Pt0tkS2WGRtwFMu3aj0+W 6P6vbmL2S3u563s/dU2Kjw0VRa/zgIdw8PXiUcHvOTnXb5TgBbfUDBXpyiR53cVdj/5PL7 7cmTrrHd0QmXdeDF8aseF7SzcbxjH30pq8LbQYhvuVwK/dzEBFdwyORsNT/0I5isMjjrhZ xdZU8i/MG/oSLX8oXH3aL5GLdIMFFmb6DRYKyVHS1jtaAb/0BRaTuIDhIO/hXg== 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 4Lv2BP32Jlz17yx; Thu, 28 Jul 2022 20:22:21 +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 26SKMLkA005566; Thu, 28 Jul 2022 20:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26SKMLPU005565; Thu, 28 Jul 2022 20:22:21 GMT (envelope-from git) Date: Thu, 28 Jul 2022 20:22:21 GMT Message-Id: <202207282022.26SKMLPU005565@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: 9bbf57a2ad46 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9bbf57a2ad4666371d8de3cde0a9b8879e826590 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659039741; 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=4b2BECz3qK1/66Bu1AKrfI4jihJMzZYQ8C4DxuUG7U4=; b=adEgmoHuasLm49y08lGPIkLimn6DajF+ksIco1TEKHQgDMQBBpwOP3Bl4u9gP/IRwgvoJR zMwmhP/vsHbwbs7jvmaoiNsvxB87t9yjz+g3OO50uFZSyxt11stblafNMwY3tg8ZYQMFBV cY389Bok0HFuyH6twR8HfhdXFZ5uLF2UC9eMDp782qi+ik3o0RNb9Mm8mb0N27UzC0aqbm VM9R+fb8MG+DZLRwSlNkMs1A12JIrgeH6LHgwlms3XStHztFWDRPb5oRCPDJR+XorTI6Hi KSyfTMacwT8KuYiIwWKdUL78iMFvAIqiPtWo6mVyz5E+CecDqj8hMAkqz6lW+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659039741; a=rsa-sha256; cv=none; b=APPyFmi8KxWfMzMVmKeVeZKJ0wB/y5pjxzCUb0Y+rDXSQ6sppiZUtnc7wiKM1yj4aoKDN4 UHeMlMA8nJ870Esk3Ug6Nx0IBQ58fULp3Rten3A478YBycmH3K9sOO8vg3ckxsAXlKvizb 7MSuT3m+8XE0katS2Yy4E0fESj40S+3tYy6qUd5TZ5rMwrnRM99ytunLNfj52plKrAgAvt Dlho17YTJtl+dsmOKy3Sov8hMubo5ZLBzzQKNuKrE2zmi9Uot5wRsJh3nnO1PLBtx82ZC5 +3W1rqDM9W3WPfbY179T4f8kWw5JpQIfWZpdcoeEUMipTZSE/ITDzTe8W8Xn6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9bbf57a2ad4666371d8de3cde0a9b8879e826590 commit 9bbf57a2ad4666371d8de3cde0a9b8879e826590 Author: Rick Macklem AuthorDate: 2022-07-11 23:50:34 +0000 Commit: Rick Macklem CommitDate: 2022-07-28 20:18:49 +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 (cherry picked from commit d4a11b3e3bddb1fa3bdd101e12aea6f5937356fa) --- 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 529655cfe5ca..51c7bb25d357 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -988,7 +988,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,