public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, NeilBrown <neilb@ownmail.net>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v7 1/2] NFSD: use per-operation statidx for callback procedures
Date: Sat, 14 Mar 2026 07:55:17 -0400	[thread overview]
Message-ID: <e5f05ba48418df7ee0af18286a24d700a3f1b623.camel@kernel.org> (raw)
In-Reply-To: <20260313163148.281676-2-cel@kernel.org>

On Fri, 2026-03-13 at 12:31 -0400, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> The callback RPC procedure table uses NFSPROC4_CB_##call for
> p_statidx, which maps CB_NULL to index 0 and every
> compound-based callback (CB_RECALL, CB_LAYOUT, CB_OFFLOAD,
> etc.) to index 1. All compound callback operations therefore
> share a single statistics counter, making per-operation
> accounting impossible.
> 
> Assign p_statidx from the NFSPROC4_CLNT_##proc enum instead,
> giving each callback operation its own counter slot. The
> counts array is already sized by ARRAY_SIZE(nfs4_cb_procedures),
> so no allocation change is needed.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  fs/nfsd/nfs4callback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index aea8bdd2fdc4..74effafdd0dc 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -1016,7 +1016,7 @@ static int nfs4_xdr_dec_cb_offload(struct rpc_rqst *rqstp,
>  	.p_decode  = nfs4_xdr_dec_##restype,				\
>  	.p_arglen  = NFS4_enc_##argtype##_sz,				\
>  	.p_replen  = NFS4_dec_##restype##_sz,				\
> -	.p_statidx = NFSPROC4_CB_##call,				\
> +	.p_statidx = NFSPROC4_CLNT_##proc,				\
>  	.p_name    = #proc,						\
>  }
>  

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-03-14 11:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 16:31 [PATCH v7 0/2] NFSD: move accumulated callback ops to per-net namespace Chuck Lever
2026-03-13 16:31 ` [PATCH v7 1/2] NFSD: use per-operation statidx for callback procedures Chuck Lever
2026-03-14 11:55   ` Jeff Layton [this message]
2026-03-13 16:31 ` [PATCH v7 2/2] NFSD: convert callback RPC program to per-net namespace Chuck Lever
2026-03-14 12:04   ` Jeff Layton
2026-03-14 15:47     ` Chuck Lever
2026-03-14 23:01       ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5f05ba48418df7ee0af18286a24d700a3f1b623.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@ownmail.net \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox