Skip to content

Commit 39bd1bf

Browse files
committed
NFSD: use per-operation statidx for callback procedures
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. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 18755b8 commit 39bd1bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/nfsd/nfs4callback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ static int nfs4_xdr_dec_cb_offload(struct rpc_rqst *rqstp,
10161016
.p_decode = nfs4_xdr_dec_##restype, \
10171017
.p_arglen = NFS4_enc_##argtype##_sz, \
10181018
.p_replen = NFS4_dec_##restype##_sz, \
1019-
.p_statidx = NFSPROC4_CB_##call, \
1019+
.p_statidx = NFSPROC4_CLNT_##proc, \
10201020
.p_name = #proc, \
10211021
}
10221022

0 commit comments

Comments
 (0)