From: schumaker.anna@gmail.com
To: Trond.Myklebust@hammerspace.com, linux-nfs@vger.kernel.org
Cc: Anna.Schumaker@Netapp.com
Subject: [PATCH 3/3] nfs: show dynamic nconnect
Date: Mon, 15 Nov 2021 11:58:18 -0500 [thread overview]
Message-ID: <20211115165818.2583501-3-Anna.Schumaker@Netapp.com> (raw)
In-Reply-To: <20211115165818.2583501-1-Anna.Schumaker@Netapp.com>
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
Through sysfs we can change the number of xprts attached to an
rpc_client. This lets us change the displayed nconnect= value to reflect
the actual number of connected xprts for the given mount.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
fs/nfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 3aced401735c..f6ede7bf18f9 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -478,7 +478,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
rpc_peeraddr2str(nfss->client, RPC_DISPLAY_NETID));
rcu_read_unlock();
if (clp->cl_nconnect > 0)
- seq_printf(m, ",nconnect=%u", clp->cl_nconnect);
+ seq_printf(m, ",nconnect=%u", rpc_clnt_xprt_switch_num_xprts(clp->cl_rpcclient));
if (version == 4) {
if (clp->cl_max_connect > 1)
seq_printf(m, ",max_connect=%u", clp->cl_max_connect);
--
2.33.1
prev parent reply other threads:[~2021-11-15 16:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 16:58 [PATCH 1/3] sunrpc: Fix potential race conditions in rpc_sysfs_xprt_state_change() schumaker.anna
2021-11-15 16:58 ` [PATCH 2/3] sunrpc: Provide a helper function for accessing the number of xprts schumaker.anna
2021-11-15 16:58 ` schumaker.anna [this message]
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=20211115165818.2583501-3-Anna.Schumaker@Netapp.com \
--to=schumaker.anna@gmail.com \
--cc=Anna.Schumaker@Netapp.com \
--cc=Trond.Myklebust@hammerspace.com \
--cc=linux-nfs@vger.kernel.org \
/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