summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-04-27 11:22:07 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-07-06 14:54:50 -0400
commitbb71e4a5d7eb151aa8d4e98c628b744f78af7c57 (patch)
tree9814de39f5cd3e96d41dc2ac8157801d804646f4 /fs/nfs
parent6619079d05404cb32be29af329b87ac3b0ad4f96 (diff)
downloadlinux-0-day-bb71e4a5d7eb151aa8d4e98c628b744f78af7c57.tar.gz
linux-0-day-bb71e4a5d7eb151aa8d4e98c628b744f78af7c57.tar.xz
pNFS: Allow multiple connections to the DS
If the user specifies -onconnect=<number> mount option, and the transport protocol is TCP, then set up <number> connections to the pNFS data server as well. The connections will all go to the same IP address. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs3client.c3
-rw-r--r--fs/nfs/nfs4client.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c
index fb0c425b5d455..148ceb74d27c9 100644
--- a/fs/nfs/nfs3client.c
+++ b/fs/nfs/nfs3client.c
@@ -102,6 +102,9 @@ struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv,
return ERR_PTR(-EINVAL);
cl_init.hostname = buf;
+ if (mds_clp->cl_nconnect > 1 && ds_proto == XPRT_TRANSPORT_TCP)
+ cl_init.nconnect = mds_clp->cl_nconnect;
+
if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 5c244c440658b..616393a01c062 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -944,6 +944,9 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv,
return ERR_PTR(-EINVAL);
cl_init.hostname = buf;
+ if (mds_clp->cl_nconnect > 1 && ds_proto == XPRT_TRANSPORT_TCP)
+ cl_init.nconnect = mds_clp->cl_nconnect;
+
if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
__set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);