From nobody Sun Mar 13 20:16:29 2022 X-Original-To: dev-commits-src-main@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 2572F1A1C911; Sun, 13 Mar 2022 20:16:30 +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 4KGrXt0Vgmz4qcv; Sun, 13 Mar 2022 20:16:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647202590; 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=gAya43FVOki7qDE9nEqmFOs2qkfe3ZPFAi4E1bSTlSI=; b=AeCEGnLYUk+60b2Q//OBIj88a3vQlLo4aoLvgRC1XfYNt6mK8ikfDqUVo9F+50iQJsLAFs xymf0mQFVau/goDxRIELU0WHgX4RPSLfY7dJowr9/dt1tIgs9/0eaH6riWbldj/ANsH17R kbLJKifEkkjaaKl9d/w2tv+F0UNq5SR1hKXur0G4Me6VUm+F7+xOWV0RWf28KnEYyqU1PV csrLycmCpcUbxY7Jw/0e6P23PYTjahs1XX8HYHfs2VRTpXo7Sjw0ZJmjK1ZvvZKYAPhOYX uln5QVutQqlgmQB7DBjOPdZ3AsPYn8MshKXzEbhSonxYm3I1UsmTYSWGw1korA== 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 E07CF1FC6B; Sun, 13 Mar 2022 20:16:29 +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 22DKGT3k059996; Sun, 13 Mar 2022 20:16:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22DKGTBM059995; Sun, 13 Mar 2022 20:16:29 GMT (envelope-from git) Date: Sun, 13 Mar 2022 20:16:29 GMT Message-Id: <202203132016.22DKGTBM059995@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: 57014f21e754 - main - nfscl: Fix NFSv4.1/4.2 Lookup+Open RPC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 57014f21e754db70e4811f9d064303cd8608f164 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647202590; 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=gAya43FVOki7qDE9nEqmFOs2qkfe3ZPFAi4E1bSTlSI=; b=YE5I/HpBPcbImqGaO7bOL2E1ruMux7rGHYy9iXgfGEsfumuMO2oyEFWVl8+xZRQfgalhyH AlSyzBZUSa4//8MsrjrxfY8KJCfj8loOPeir6KdcytiY/vlG2cTxJ0mXp1o2NcTfGx7FLJ iG/4NNkHvVmsiQPF//14+3rhV76tET7RqdGCbr7h5IH6Uy4jU+q7eQR+XqoTYEXhMoGnv6 m4fsNJAJSm/hK/nK38u1C5G+kiSz9f6ZWwbYDfHgvRYJIFBZpRcazdFJ7lFcs9cCzk0rrj TIj5/DKquvOMpLW76KBaMooAY6lBL+YH9uFc8wNQd8XnEWPD6Gu8rg6ksRUTag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647202590; a=rsa-sha256; cv=none; b=k2BboRN4zZFtc76UVKr4aXgLz1eAfbf1u4Q2oyeFQg8Ka+MA0D0L/LjXr0l3M776hDafsA yUTQrbyXr4BP6zH/7Dchpra40TWoc+dYzcH8kED7Li1Fxtvjnh3ro4yRAaduIurQegQnNS yF2bsxTiZ2Wv5UWUDX8uwzCfA5T6oFpUe3Zqlj/x5tdmwhIZCq8//aTH/BtqC1teepCo1I 2sT74QzQ+RLVW9TvNcbS0ysu2DrwWnDU4YWQ0EvzTU7vgCAJmieGwzcjVWj9R7VgrU8dFs 3tWjvRT5Bv/tDgSZ61hvvzL6WBZt0RZvYimHhH6iwsckDKMaIFVqLbzyiWb4HA== 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=57014f21e754db70e4811f9d064303cd8608f164 commit 57014f21e754db70e4811f9d064303cd8608f164 Author: Rick Macklem AuthorDate: 2022-03-13 20:15:12 +0000 Commit: Rick Macklem CommitDate: 2022-03-13 20:15:12 +0000 nfscl: Fix NFSv4.1/4.2 Lookup+Open RPC Use of the Lookup+Open RPC is currently disabled, due to a problem detected during testing. This patch fixes this problem. The problem was that nfscl_postop_attr() does not parse the attributes if nd_repstat != 0. It also would parse the return status for the operation, where the Lookup+Open code had already parsed it. The first change in the patch does not make any semantics change, but makes the code identical to what is done later in the function, so that it is apparent that the semantics should be the same in both places. Lookup+Open remains disabled while further testing is being done, so this patch has no effect at this time. --- sys/fs/nfsclient/nfs_clrpcops.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 8886ccc8429e..cc4899af1c90 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -1499,10 +1499,9 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred, ND_NFSV4) { /* Load the directory attributes. */ error = nfsm_loadattr(nd, dnap); - if (error == 0) - *dattrflagp = 1; - else + if (error != 0) goto nfsmout; + *dattrflagp = 1; } /* Check Lookup operation reply status. */ if (openmode != 0 && (nd->nd_flag & ND_NOMOREDATA) == 0) { @@ -1524,10 +1523,15 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred, NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); if (*++tl != 0) goto nfsmout; - error = nfscl_postop_attr(nd, nap, attrflagp, stuff); - if (error == 0) - /* Successfully got Lookup done. */ + error = nfsm_loadattr(nd, nap); + if (error == 0) { + /* + * We have now successfully completed the + * lookup, so set nd_repstat to 0. + */ nd->nd_repstat = 0; + *attrflagp = 1; + } } goto nfsmout; }