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 6/7] SUNRPC allow for unspecified transport time in rpc_clnt_add_xprt
Date: Thu,  9 Dec 2021 14:53:34 -0500	[thread overview]
Message-ID: <20211209195335.32404-7-olga.kornievskaia@gmail.com> (raw)
In-Reply-To: <20211209195335.32404-1-olga.kornievskaia@gmail.com>

From: Olga Kornievskaia <kolga@netapp.com>

If the supplied argument doesn't specify the transport type, use the
type of the existing rpc clnt and its existing transport.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 net/sunrpc/clnt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index a312ea2bc440..c83fe618767c 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2900,7 +2900,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
 	unsigned long connect_timeout;
 	unsigned long reconnect_timeout;
 	unsigned char resvport, reuseport;
-	int ret = 0;
+	int ret = 0, ident;
 
 	rcu_read_lock();
 	xps = xprt_switch_get(rcu_dereference(clnt->cl_xpi.xpi_xpswitch));
@@ -2914,8 +2914,11 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
 	reuseport = xprt->reuseport;
 	connect_timeout = xprt->connect_timeout;
 	reconnect_timeout = xprt->max_reconnect_timeout;
+	ident = xprt->xprt_class->ident;
 	rcu_read_unlock();
 
+	if (!xprtargs->ident)
+		xprtargs->ident = ident;
 	xprt = xprt_create_transport(xprtargs);
 	if (IS_ERR(xprt)) {
 		ret = PTR_ERR(xprt);
-- 
2.27.0


  parent reply	other threads:[~2021-12-09 19:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 19:53 [PATCH 0/7] NFSv4.1+ support for session trunking discovery Olga Kornievskaia
2021-12-09 19:53 ` [PATCH 1/7] NFSv4 remove zero number of fs_locations entries error check Olga Kornievskaia
2021-12-09 19:53 ` [PATCH 2/7] NFSv4 store server support for fs_location attribute Olga Kornievskaia
2021-12-09 19:53 ` [PATCH 3/7] NFSv4.1 query for fs_location attr on a new file system Olga Kornievskaia
2021-12-09 19:53 ` [PATCH 4/7] NFSv4 expose nfs_parse_server_name function Olga Kornievskaia
2021-12-09 19:53 ` [PATCH 5/7] NFSv4 handle port presence in fs_location server string Olga Kornievskaia
2021-12-09 19:53 ` Olga Kornievskaia [this message]
2021-12-09 19:53 ` [PATCH 7/7] NFSv4.1 test and add 4.1 trunking transport Olga Kornievskaia
2021-12-11 11:39 ` [PATCH 0/7] NFSv4.1+ support for session trunking discovery Wang Yugui

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=20211209195335.32404-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.