From nobody Sun Dec 3 23:33:00 2023 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 4Sk34s4F4Jz51mXm; Sun, 3 Dec 2023 23:33:01 +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 4Sk34r52sNz4MTM; Sun, 3 Dec 2023 23:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701646380; 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=7dle6ujod53zCyCuhtjgv0tBUVOcBwCribTztmg/130=; b=IkpwiFqv8lPJU20VVHJeOU26iOsRuKQq1nAUi3JiJkhVXSMQE4bi279FB0X9K5UCiSPNnA /MZu7vbe602urUJDRYIsbAzd1ZGTMU1zt4SYzBT0vuDSr63IfG19pOpWlifLn97pNgcCbi mPNuZUHOnLnPAWihntxmBMi6rXpgMhhawgslrtS61QQ8376+PiA257o/vfqsSywak+Gc5S /JdUjH78lBc9qL6L9eTiJ0eSbeoXxmbebeDwFtm3RWexzGYUINJNdni87rC0RH/RCSwzz3 1dl2qvND317hCB8XALTYrw6DPiW4l6yMI5LP2Ic5umD6G5hOWv/xXsh9LF1JtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701646380; 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=7dle6ujod53zCyCuhtjgv0tBUVOcBwCribTztmg/130=; b=ptJvz1oZHSVlUCyNyw5rPsX3mJAC/HLCoqzYS0lEa+NjTpSAYF5QXhNEp48tJmPJMqV3cO zxizAAJ06Rr9UjYLijqXVU39gZhFo9RiME/8NT5tz/uhOn3prNiUkoHugnbZe9xLsghywb peTZQgqCENsphOGe6fu9H72zkGx7gSC6VNlznIDDr+Wauwbd/6TNzsIFQe+3KwfbmQgBGq k5mW9rZWoXPS0QTT8rDa3R6lRmVJ6Ge3/ABtQXwjHWEpb5Wvh2OA3viExZ6T7jV6hBmRRF YP5FelavdjAKmmbVZumLOXMyv/8zhrcKdoDNN5irkPmE3J9q8rPDHQ6IiyBUNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701646380; a=rsa-sha256; cv=none; b=Tnh/xaBbIRAO+WmCyCPlOtaY0035Xh6NsZ3UDX+dvFtlmALlf0iqzLX0Nx3+WYulHqJzbj NCho3iRK291TwsLKYke0xbyz6UMr2/5SnIua9gmV5/VysH15eRa5CaPLImGKidcqHgXT7s 8X2Oke0LLbigLYMOTGb3Hsl+hMpgqRzGQadYPBuB9puVR6bSD5Zdw6Lh3ANKYVmDLzF125 rsEIghVn8y1RYLS7uxxTsYzU/4HD8tjNiWIBvz9Wh9ssG4Up794C1OJhm/zrkG+nPZ/RrO 1S5YxmBydym53bsIaW7ik+UCmDIKNu6cVL1EF+VnC+8dx653oHtZMeGnKp+usA== 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 4Sk34r45d3z1JCl; Sun, 3 Dec 2023 23:33:00 +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 3B3NX0kP006234; Sun, 3 Dec 2023 23:33:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B3NX0X5006231; Sun, 3 Dec 2023 23:33:00 GMT (envelope-from git) Date: Sun, 3 Dec 2023 23:33:00 GMT Message-Id: <202312032333.3B3NX0X5006231@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: 6aded1e6b2e5 - main - nfscl: Fix processing of a rare Rename reply case 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: 6aded1e6b2e5549120031032e1c7f8b002882327 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6aded1e6b2e5549120031032e1c7f8b002882327 commit 6aded1e6b2e5549120031032e1c7f8b002882327 Author: Rick Macklem AuthorDate: 2023-12-03 23:31:01 +0000 Commit: Rick Macklem CommitDate: 2023-12-03 23:31:01 +0000 nfscl: Fix processing of a rare Rename reply case When delegations are enabled (they are not by default in the FreeBSD NFSv4 server), rename will check for and return delegations. If the second of these DelegReturn operations were to fail (they rarely do), then the code would not retry the rename with returning delegations, as it is intended to do. The patch fixes the problem, since the DelegReturn reply status is the second iteration of the loop and not the first iteration. As noted, this bug would have rarely manifested a problem, since DelegReturn operations do not normally fail. 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 1b0011760d10..81871dc885cd 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -3001,7 +3001,7 @@ tryagain: ND_NFSV4) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); if (*(tl + 1)) { - if (i == 0 && ret > 1) { + if (i == 1 && ret > 1) { /* * If the Delegreturn failed, try again * without it. The server will Recall, as