diff mbox

[v1,16/16] NFS: Disable SESSION4_BACK_CHAN when a backchannel sidecar is to be used

Message ID 20141016194024.13414.22106.stgit@manet.1015granger.net (mailing list archive)
State New, archived
Headers show

Commit Message

Chuck Lever Oct. 16, 2014, 7:40 p.m. UTC
A CREATE_SESSION operation with SESSION4_BACK_CHAN cleared is sent
to force the server to report SEQ4_STATUS_CB_PATH_DOWN.  The client
recovers by setting up a sidecar backchannel connection.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfs/nfs4proc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 2eaf7ec..e0bcc30 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7187,6 +7187,7 @@  static int _nfs4_proc_create_session(struct nfs_client *clp,
 	struct nfs41_create_session_args args = {
 		.client = clp,
 		.cb_program = NFS4_CALLBACK,
+		.flags = SESSION4_PERSIST,
 	};
 	struct nfs41_create_session_res res = {
 		.client = clp,
@@ -7200,7 +7201,8 @@  static int _nfs4_proc_create_session(struct nfs_client *clp,
 	int status;
 
 	nfs4_init_channel_attrs(&args);
-	args.flags = (SESSION4_PERSIST | SESSION4_BACK_CHAN);
+	if (!clp->cl_bc_rpcclient)
+		args.flags |= SESSION4_BACK_CHAN;
 
 	status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
 	trace_nfs4_create_session(clp, status);