From nobody Sun Nov 02 20:24:31 2025 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 4d05mH3qJtz6FQJp; Sun, 02 Nov 2025 20:24:31 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d05mH342cz3dKc; Sun, 02 Nov 2025 20:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762115071; 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=FoXrCiEqLX5dUUA1O2m1w/ktnqbs1mjQBPUvod+9bdE=; b=H0U09pJLdGIh99TfKG0ujabDUluqztybyfzWLxVIu38ETjBYmb+vIQubS7n7P9Vys67153 jQ/19pd1khtNSIXettMkDUEIg1oy3bhnGyFmm/ZsYqWUdUaTUcEdJtFCDZFEw6PZCLUNEi B4gzdcogh7YyLsZPVkdJ/MIhLFyMTl5sXG/5kcEUXwESSmb/FGJAHrnfs+jPw12QZ03DjY oGVXRrI/ivhL4VkFo18ZnBD7UXi2zRgdfwTilcaBlHJ6EVNZVaMs/n+SlioYLG7drpA6J1 SqbbVqJZ6kIHNbAv0XYQd+ZeYxbK34S6n947kDz72rmJLMdaV0uoW7r9QvYWsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762115071; 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=FoXrCiEqLX5dUUA1O2m1w/ktnqbs1mjQBPUvod+9bdE=; b=T12oG3t4Igy3QA2QpjSgapWZ8ugZqTqA+1t7eb0ho5j22esoe7J+qjeIlGDwNWFINC1GGO 97dT8cjF7pWK+hCieBrjI5USDL6JmO4IRuKDi4VdmTEVe/g6S8DmPoLkQUoVQcwy1WfXnM KuqvdSe3WkMG+xmWs1tpZtHkyhPV5ciyr/bXgilqN4AoKR2VXhL4M4bchSrjoKgXVSqdth xQM2uVESVOPaVBEiBkEj//OAVz5p0MRHdGT2qwCgmGBnfun/487vicDXf7Hc/RRdZ5VYWu rUMJtMdD38eCD3owtOrbgocvS8VLa7yrhnVbfAPJQMldASgpRagZT+Bm4/6MAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762115071; a=rsa-sha256; cv=none; b=lYA74vW1+3ZUUUgym1XnE8SexXz0GxD69NyUOJQPRXRflvTlVZpYQLx9LMIlLhaRkq/ohw TBb8fQsPVMUKdFbQQYpeTxT7egbizOVS47UKnGB1iHEMhi4O2ISeB5wXPUmCe8XX/6X5YL dzATNPd3mDawaoMeKtxpiiU0MiyaMAN6xhAJtOGSpGuP3ZQywNbv9oY/pv5yJs9aRuW0tf dbNRGGkwEmyh+J+oF29IifwNNm+6Rkxp0ctC+4rXH+FaT5ZR5oLZmT4JTSRNTeb+NYv7KT Jd6SuSWAVhGnR9bYZ42KFbC/dBjLhyC+mHjaE1ut/BpQ0zmVNwBMMroKiMbUaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4d05mH2PTxzhQf; Sun, 02 Nov 2025 20:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5A2KOVGW037429; Sun, 2 Nov 2025 20:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A2KOVba037426; Sun, 2 Nov 2025 20:24:31 GMT (envelope-from git) Date: Sun, 2 Nov 2025 20:24:31 GMT Message-Id: <202511022024.5A2KOVba037426@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: 26a9d67f6fbb - stable/15 - nfscommon: Update the nfs_bigreply array 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-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/15 X-Git-Reftype: branch X-Git-Commit: 26a9d67f6fbbc6620d23bfda9fe8f62801ad354c Auto-Submitted: auto-generated The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=26a9d67f6fbbc6620d23bfda9fe8f62801ad354c commit 26a9d67f6fbbc6620d23bfda9fe8f62801ad354c Author: Elliott Mitchell AuthorDate: 2025-10-19 20:29:08 +0000 Commit: Rick Macklem CommitDate: 2025-11-02 21:20:12 +0000 nfscommon: Update the nfs_bigreply array The variable is simply a long series of flags. Mark as boolean to allow the compiler to use smaller types. Convert to designated initializer to better indicate which operations it is set for. Without this the array is kind of long and sparse. nfsv4_setsequence() is no longer used outside nfs_commonsubs.c, so now mark it as static. The fourth argument is true/false, so convert to boolean. No semantics change is made by this commit. (cherry picked from commit a6369fb9e4b40396ea6ef1987436019612c387cd) --- sys/fs/nfs/nfs_commonsubs.c | 23 ++++++++++++++++------- sys/fs/nfs/nfs_var.h | 2 -- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index dd3b8b4f1708..abfec9edc485 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -216,10 +216,17 @@ NFSD_VNET_DEFINE_STATIC(u_char *, nfsrv_dnsname) = NULL; * marked 0 in this array, the code will still work, just not quite as * efficiently.) */ -static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }; +static bool nfs_bigreply[NFSV42_NPROCS] = { + [NFSPROC_GETACL] = true, + [NFSPROC_GETEXTATTR] = true, + [NFSPROC_LISTEXTATTR] = true, + [NFSPROC_LOOKUP] = true, + [NFSPROC_READ] = true, + [NFSPROC_READDIR] = true, + [NFSPROC_READDIRPLUS] = true, + [NFSPROC_READDS] = true, + [NFSPROC_READLINK] = true, +}; /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); @@ -232,6 +239,8 @@ static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, static void nfsrv_refstrbigenough(int, u_char **, u_char **, int *); static uint32_t vtonfsv4_type(struct vattr *); static __enum_uint8(vtype) nfsv4tov_type(uint32_t, uint16_t *); +static void nfsv4_setsequence(struct nfsmount *, struct nfsrv_descript *, + struct nfsclsession *, bool, struct ucred *); static struct { int op; @@ -5026,9 +5035,9 @@ nfsv4_seqsess_cacherep(uint32_t slotid, struct nfsslot *slots, int repstat, /* * Generate the xdr for an NFSv4.1 Sequence Operation. */ -void +static void nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd, - struct nfsclsession *sep, int dont_replycache, struct ucred *cred) + struct nfsclsession *sep, bool dont_replycache, struct ucred *cred) { uint32_t *tl, slotseq = 0; int error, maxslot, slotpos; @@ -5059,7 +5068,7 @@ nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd, *tl++ = txdr_unsigned(slotseq); *tl++ = txdr_unsigned(slotpos); *tl++ = txdr_unsigned(maxslot); - if (dont_replycache == 0) + if (!dont_replycache) *tl = newnfs_true; else *tl = newnfs_false; diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 61083ecf2d66..16a76c060e78 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -361,8 +361,6 @@ int nfsv4_getipaddr(struct nfsrv_descript *, struct sockaddr_in *, int nfsv4_seqsession(uint32_t, uint32_t, uint32_t, struct nfsslot *, struct mbuf **, uint16_t); void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, int, struct mbuf **); -void nfsv4_setsequence(struct nfsmount *, struct nfsrv_descript *, - struct nfsclsession *, int, struct ucred *); int nfsv4_sequencelookup(struct nfsmount *, struct nfsclsession *, int *, int *, uint32_t *, uint8_t *, bool); void nfsv4_freeslot(struct nfsclsession *, int, bool);