public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: anna.schumaker@netapp.com, trondmy@hammerspace.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v1 12/15] SUNRPC: Set SOFTCONN when destroying GSS contexts
Date: Tue, 12 May 2020 17:13:55 -0400	[thread overview]
Message-ID: <20200512211355.3288.36563.stgit@manet.1015granger.net> (raw)
In-Reply-To: <20200512210724.3288.15187.stgit@manet.1015granger.net>

Move the RPC_TASK_SOFTCONN flag into rpc_call_null_helper(). The
only minor behavior change is that it is now also set when
destroying GSS contexts.

This gives a better guarantee that gss_send_destroy_context() will
not hang for long if a connection cannot be established.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/clnt.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index dad018b42939..e7ed151079d0 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2752,7 +2752,8 @@ struct rpc_task *rpc_call_null_helper(struct rpc_clnt *clnt,
 		.rpc_op_cred = cred,
 		.callback_ops = (ops != NULL) ? ops : &rpc_default_ops,
 		.callback_data = data,
-		.flags = flags | RPC_TASK_SOFT | RPC_TASK_NULLCREDS,
+		.flags = flags | RPC_TASK_SOFT | RPC_TASK_SOFTCONN |
+			 RPC_TASK_NULLCREDS,
 	};
 
 	return rpc_run_task(&task_setup_data);
@@ -2815,8 +2816,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt,
 		goto success;
 	}
 
-	task = rpc_call_null_helper(clnt, xprt, NULL,
-			RPC_TASK_SOFTCONN|RPC_TASK_ASYNC,
+	task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC,
 			&rpc_cb_add_xprt_call_ops, data);
 
 	rpc_put_task(task);
@@ -2859,8 +2859,7 @@ int rpc_clnt_setup_test_and_add_xprt(struct rpc_clnt *clnt,
 		goto out_err;
 
 	/* Test the connection */
-	task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_SOFTCONN,
-				    NULL, NULL);
+	task = rpc_call_null_helper(clnt, xprt, NULL, 0, NULL, NULL);
 	if (IS_ERR(task)) {
 		status = PTR_ERR(task);
 		goto out_err;


  parent reply	other threads:[~2020-05-12 21:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 21:12 [PATCH v1 00/15] Possible patches for v5.8 Chuck Lever
2020-05-12 21:12 ` [PATCH v1 01/15] SUNRPC: Signalled ASYNC tasks need to exit Chuck Lever
2020-05-12 21:13 ` [PATCH v1 02/15] SUNRPC: receive buffer size estimation values almost never change Chuck Lever
2020-05-12 21:13 ` [PATCH v1 03/15] SUNRPC: Trace GSS context lifetimes Chuck Lever
2020-05-12 21:13 ` [PATCH v1 04/15] SUNRPC: Update the rpc_show_task_flags() macro Chuck Lever
2020-05-12 21:13 ` [PATCH v1 05/15] SUNRPC: Update the RPC_SHOW_SOCKET() macro Chuck Lever
2020-05-12 21:13 ` [PATCH v1 06/15] SUNRPC: Add tracepoint to rpc_call_rpcerror() Chuck Lever
2020-05-12 21:13 ` [PATCH v1 07/15] SUNRPC: Split the xdr_buf event class Chuck Lever
2020-05-12 21:13 ` [PATCH v1 08/15] SUNRPC: Trace transport lifetime events Chuck Lever
2020-05-12 21:13 ` [PATCH v1 09/15] SUNRPC: trace RPC client " Chuck Lever
2020-05-12 21:13 ` [PATCH v1 10/15] SUNRPC: rpc_call_null_helper() already sets RPC_TASK_NULLCREDS Chuck Lever
2020-05-12 21:13 ` [PATCH v1 11/15] SUNRPC: rpc_call_null_helper() should set RPC_TASK_SOFT Chuck Lever
2020-05-12 21:13 ` Chuck Lever [this message]
2020-05-12 21:14 ` [PATCH v1 13/15] NFS: nfs_xdr_status should record the procedure name Chuck Lever
2020-05-12 21:14 ` [PATCH v1 14/15] NFS: Trace short NFS READs Chuck Lever
2020-05-12 21:14 ` [PATCH v1 15/15] NFS: Add a tracepoint in nfs_set_pgio_error() Chuck Lever

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=20200512211355.3288.36563.stgit@manet.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox