All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olga Kornievskaia <olga.kornievskaia@gmail.com>
To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v3 6/6] NFSv4 allow for nconnect value of trunkable transport
Date: Tue, 15 Jun 2021 21:10:13 -0400	[thread overview]
Message-ID: <20210616011013.50547-7-olga.kornievskaia@gmail.com> (raw)
In-Reply-To: <20210616011013.50547-1-olga.kornievskaia@gmail.com>

From: Olga Kornievskaia <kolga@netapp.com>

If the new mount asked for nconnect mount, then create old client
number of connections to the destination address that has been
established as the same server with trunkable address.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>

--- There might be a number of objection to this patch. One
I can think of is that this patch creates the nconnects based on
whether or not the new mount asked for nconnect instead of
unconditionally creating nconnect number of connections. The patch
still creates nconnect connections based on the original value
instead of picking the value of clp->cl_nconnect. I would have
preferred that would be done. I don't see what can be wrong with
using the new value. But I feared to go against what was objected
before. My preference would be to (1) create clp->cl_nconnect
connections or (2) not use this patch at all or (3) use as is
here (meaning at least not create extra connections unless asked
for by the mount).
---
 fs/nfs/nfs4client.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index af57332503be..50fa9d53b444 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -427,6 +427,15 @@ static void nfs4_add_trunk(struct nfs_client *clp, struct nfs_client *old)
 
 	rpc_clnt_add_xprt(old->cl_rpcclient, &xprt_args,
 			  rpc_clnt_test_and_add_xprt, NULL);
+
+	if (clp->cl_nconnect > 1) {
+		int i;
+
+		for (i = 0; i < old->cl_nconnect - 1; i++)
+			if (rpc_clnt_add_xprt(old->cl_rpcclient, &xprt_args,
+					      NULL, NULL) < 0)
+				break;
+	}
 }
 
 /**
-- 
2.27.0


  parent reply	other threads:[~2021-06-16  1:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  1:10 [PATCH v3 0/6] do not collapse trunkable transports Olga Kornievskaia
2021-06-16  1:10 ` [PATCH v3 1/6] SUNRPC keep track of number of transports to unique addresses Olga Kornievskaia
2021-06-16  1:10 ` [PATCH v3 2/6] SUNRPC add xps_nunique_destaddr_xprts to xprt_switch_info in sysfs Olga Kornievskaia
2021-06-16  1:10 ` [PATCH v3 3/6] NFSv4 introduce max_connect mount options Olga Kornievskaia
2021-06-16  1:10 ` [PATCH v3 4/6] SUNRPC enforce creation of no more than max_connect xprts Olga Kornievskaia
2021-06-16  1:10 ` [PATCH v3 5/6] NFSv4 add network transport when session trunking is detected Olga Kornievskaia
2021-06-16  1:10 ` Olga Kornievskaia [this message]
2021-08-06 20:12   ` [PATCH v3 6/6] NFSv4 allow for nconnect value of trunkable transport Olga Kornievskaia
2021-07-09 14:24 ` [PATCH v3 0/6] do not collapse trunkable transports Olga Kornievskaia

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=20210616011013.50547-7-olga.kornievskaia@gmail.com \
    --to=olga.kornievskaia@gmail.com \
    --cc=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.