mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 17:35:18 -04:00
sunrpc: use per-net counts in svc_seq_show()
Update svc_seq_show() to read from the per-netns statp->vs_count[] arrays instead of the global svc_version->vs_count[]. The only caller is nfsd, which always allocates vs_count via svc_stat_alloc_counts() in nfsd_net_init(), so the per-netns arrays are always available. This makes /proc/net/rpc/nfsd report per-network-namespace procedure call counts. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-2-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
@@ -108,7 +108,7 @@ void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp)
|
||||
for (j = 0; j < vers->vs_nproc; j++) {
|
||||
count = 0;
|
||||
for_each_possible_cpu(k)
|
||||
count += per_cpu(vers->vs_count[j], k);
|
||||
count += per_cpu(statp->vs_count[i][j], k);
|
||||
seq_printf(seq, " %lu", count);
|
||||
}
|
||||
seq_putc(seq, '\n');
|
||||
|
||||
Reference in New Issue
Block a user