From nobody Tue Nov 14 02:04:06 2023 X-Original-To: dev-commits-src-branches@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 4STqNQ4VHHz50jWT; Tue, 14 Nov 2023 02:04:06 +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 4STqNQ44S1z4bg7; Tue, 14 Nov 2023 02:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699927446; 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=3JclhgPWkDy2/Dyp4vS9XuxNmJHeAKEckcNYlxmrBxI=; b=HpT7sh0er+7c5m8ha6phdnB5b3FPf6vMLngnnyxh98Ypxbj8MOZOVDr/uH1X9JsK+/Sgsz 1IbIdXLwAqHHVSthku2gsGZXvXuDvffvO8yPjKhZwO6oRWbXc+ZEtVzoeeVu031oVo8daH jwEMBCMy4sTyzUZ24CFBkgAAa85NnZzxyj2CX5EVe8VO13NYH5Q/1gIak3BarmAsQp9TEz 7cNovUp1LqmPj/G1mHeqoJzHkLYipL8TT5+Y1QdWpO3BKfsgZVGMuuvK6CXX4Tfgu0fp+m txAeZf+0KpOjdO4U3tikAyiRarNlzEyS0zhesbAWbtHPl8xeLhwmQaoEYGPgdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699927446; 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=3JclhgPWkDy2/Dyp4vS9XuxNmJHeAKEckcNYlxmrBxI=; b=YRwxfWNexl7W1LIDeYUykNMODH9017f4CMf2J3hI6D0Iuf4TTdFN7n+Vth8IaoaRtSLVbC eoLQQ3wiV78W3/mDQ4xFAwEJXoTmPbKIqM0teaQfVVRQlSKRONYJnYsK8Ad1Um+FQiUCzm 2EEHxXz1aN7TE3hFMTNz9dQFr9NC3kHDZh0nSs2FU5ATz7GhmEEWpRZhch6BOspJ15W5FB HOxxo0fM/GRoHNfi+Em9XWCDCVrcQ3Q/hfAsV4WaUW+XBkDBTN0jp65V94/Ia+tkf93FKe WybLmaC4sRyRHLXS4TwxrDKPBGB/wE4jsGoJy7VhZXtZ3cTQfdbjXrA+zuQIkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699927446; a=rsa-sha256; cv=none; b=EdmaY7uf39RN+0Iuo+yRyMqUp9ChnFWOnaunNHg6DNSH2Nu+RWKbPgRUCwYUR6s7LrINPe hS1TmK6/zq+JgHlUzcNNO7jIDEmIbOESYAbbiOASe6peD4/M+BbtSdHKyxhYvG9aVt+clq SteT+J6jK6jGL+Xn8k5+U6MXaHTm6H5ZaPbyacwkaXNBUuchSF2qWypVHgEQdrWFnvxBNl Me9T2ouCYMCOnEOqhuLkvE81n86qDFyJJ0FzEfsxMQj3ZVycGx7bOi34dGy9APfYNKkDDy H2G+p1jodEyR1QU3qTMKFWmBx5Unh0yQgoJEVmONhPGXO/+qotXI5SnIgBL8uA== 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 4STqNQ37D7zVXk; Tue, 14 Nov 2023 02:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AE246AJ031775; Tue, 14 Nov 2023 02:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE246ff031772; Tue, 14 Nov 2023 02:04:06 GMT (envelope-from git) Date: Tue, 14 Nov 2023 02:04:06 GMT Message-Id: <202311140204.3AE246ff031772@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: 260e63b3d53c - stable/14 - nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/14 X-Git-Reftype: branch X-Git-Commit: 260e63b3d53c7df51fbe3169a7b96d7c479275af Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=260e63b3d53c7df51fbe3169a7b96d7c479275af commit 260e63b3d53c7df51fbe3169a7b96d7c479275af Author: Rick Macklem AuthorDate: 2023-10-18 19:42:12 +0000 Commit: Rick Macklem CommitDate: 2023-11-14 02:03:14 +0000 nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server In a recent email list discussion related to NFSv4 mount problems against a non-FreeBSD NFSv4 server, the reporter of the issue noted that the server had replied 10068 (NFSERR_RETRYUNCACHEDREP). This did not seem related to the mount problem, but I had never seen this error before. It indicates that an RPC retry after a new TCP connection has been established failed because the server did not cache the reply. Since this should only happen for idempotent operations, redoing the RPC should be safe. This patch modifies the NFSv4.1/4.2 client to redo the RPC instead of considering the server error fatal. It should only affect the unusual case where TCP connections to NFSv4 servers are breaking without the NFSv4 server rebooting. MFC after: 2 weeks (cherry picked from commit c4e298251ab01665f5bb3edeb740a51331818a45) --- sys/fs/nfs/nfs_commonkrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 29c7cdbd671c..29fbb8dc4351 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1300,7 +1300,8 @@ tryagain: nd->nd_procnum != NFSPROC_LOCKU))) || (nd->nd_repstat == NFSERR_DELAY && (nd->nd_flag & ND_NFSV4) == 0) || - nd->nd_repstat == NFSERR_RESOURCE) { + nd->nd_repstat == NFSERR_RESOURCE || + nd->nd_repstat == NFSERR_RETRYUNCACHEDREP) { /* Clip at NFS_TRYLATERDEL. */ if (timespeccmp(&trylater_delay, &nfs_trylater_max, >))