nfsd: export NFSv4 callback op stats via netlink

Add a proc4cb-ops nested attribute to the server-stats netlink dump,
reusing the existing server-proc-entry (op/count) layout. The dump
gains a callback section that emits one entry per callback opcode
(OP_CB_GETATTR..OP_CB_OFFLOAD) from the per-netns callback counters,
paged across messages like the other per-operation sections.

This lets nfsstat report NFSv4 backchannel operation counts over
netlink, including CB_GETATTR which corresponds to the procfs
wdeleg_getattr line.

Assisted-by: LLM
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260717-exportd-netlink-v7-6-b7ce17b83b60@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
Jeff Layton
2026-07-17 07:08:58 -04:00
committed by Chuck Lever
parent 1e5f641dfa
commit 46db3c8a1b
3 changed files with 34 additions and 0 deletions

View File

@@ -254,6 +254,7 @@ enum {
NFSD_A_SERVER_STATS_PROC3_OPS,
NFSD_A_SERVER_STATS_PROC4_OPS,
NFSD_A_SERVER_STATS_PROC4OPS_OPS,
NFSD_A_SERVER_STATS_PROC4CB_OPS,
__NFSD_A_SERVER_STATS_MAX,
NFSD_A_SERVER_STATS_MAX = (__NFSD_A_SERVER_STATS_MAX - 1)