diff options
author | 2024-12-12 08:47:06 +1100 | |
---|---|---|
committer | 2025-01-06 09:37:38 -0500 | |
commit | 601c8cb349c2d9a3a6cea6f53e0bf838e2e60893 (patch) | |
tree | 713b7e484bc0f2b550b935c7601d02f2f01fcd34 | |
parent | nfsd: remove artificial limits on the session-based DRC (diff) | |
download | wireguard-linux-601c8cb349c2d9a3a6cea6f53e0bf838e2e60893.tar.xz wireguard-linux-601c8cb349c2d9a3a6cea6f53e0bf838e2e60893.zip |
nfsd: add session slot count to /proc/fs/nfsd/clients/*/info
Each client now reports the number of slots allocated in each session.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 84d364975ae1..bdfe791b02f1 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2643,6 +2643,7 @@ static const char *cb_state2str(int state) static int client_info_show(struct seq_file *m, void *v) { struct inode *inode = file_inode(m->file); + struct nfsd4_session *ses; struct nfs4_client *clp; u64 clid; @@ -2679,6 +2680,13 @@ static int client_info_show(struct seq_file *m, void *v) seq_printf(m, "callback address: \"%pISpc\"\n", &clp->cl_cb_conn.cb_addr); seq_printf(m, "admin-revoked states: %d\n", atomic_read(&clp->cl_admin_revoked)); + spin_lock(&clp->cl_lock); + seq_printf(m, "session slots:"); + list_for_each_entry(ses, &clp->cl_sessions, se_perclnt) + seq_printf(m, " %u", ses->se_fchannel.maxreqs); + spin_unlock(&clp->cl_lock); + seq_puts(m, "\n"); + drop_client(clp); return 0; |