From: Bennett Amodio <bamodio@purestorage.com>
Date: Tue, 15 Aug 2017 17:48:43 -0700
Subject: [PATCH] NFS: Allow multiple connections to NFSv3 and NFSv4.0 servers
Patch-mainline: Submitted, linux-nfs@vger.kernel.org
References: fate#322786
Enable nconnect mount option and multipathing behavior for NFSv3 and NFSv4.
Signed-off-by: Jui-Yu Chang <juchang@purestorage.com>
Acked-by: NeilBrown <neilb@suse.com>
---
fs/nfs/client.c | 3 +++
fs/nfs/nfs4client.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -653,6 +653,9 @@ static int nfs_init_server(struct nfs_se
struct nfs_client *clp;
int error;
+ if (data->nfs_server.protocol == XPRT_TRANSPORT_TCP)
+ cl_init.nconnect = data->nfs_server.nconnect;
+
nfs_init_timeout_values(&timeparms, data->nfs_server.protocol,
data->timeo, data->retrans);
if (data->flags & NFS_MOUNT_NORESVPORT)
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -849,7 +849,7 @@ static int nfs4_set_client(struct nfs_se
};
struct nfs_client *clp;
- if (minorversion > 0 && proto == XPRT_TRANSPORT_TCP)
+ if (proto == XPRT_TRANSPORT_TCP)
cl_init.nconnect = nconnect;
if (server->flags & NFS_MOUNT_NORESVPORT)
set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);