[PATCH RFC Version 1 6/6] NFS schedule bind_conn_to_session for new NFSv4.1 transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andy Adamson <andros@xxxxxxxxxx>

Complete session trunking with the BIND_CONN_TO_SESSION call.
NFS cleanup after session trunking transport added

Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
---
 fs/nfs/nfs4client.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 6736805..b0423f7 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -423,8 +423,17 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp,
 				.servername = clp->cl_hostname,
 			};
 			/* Add this address as an alias */
-			rpc_clnt_add_xprt(old->cl_rpcclient, &xprt_args,
-					rpc_clnt_test_and_add_xprt, NULL);
+			error = rpc_clnt_add_xprt(old->cl_rpcclient, &xprt_args,
+					     rpc_clnt_test_and_add_xprt, NULL);
+			if (!error) {
+				nfs4_schedule_session_recovery(old->cl_session,
+					-NFS4ERR_CONN_NOT_BOUND_TO_SESSION);
+
+				/** Cancel the 2nd mount */
+				pr_info("NFS:  Session trunk. CANCEL MOUNT\n");
+				error = -EINVAL;
+				goto error;
+			}
 		}
 		clp->cl_preserve_clid = true;
 	}
-- 
1.8.3.1

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



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux