]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
pNFS: Allow multiple connections to the DS
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 27 Apr 2017 15:22:07 +0000 (11:22 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 6 Jul 2019 18:54:50 +0000 (14:54 -0400)
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>
fs/nfs/nfs3client.c
fs/nfs/nfs4client.c

index fb0c425b5d455749154857137bc228330f7308c8..148ceb74d27c9b492992ad4945a9b72985e1e836 100644 (file)
@@ -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);
 
index 5c244c440658b048ddae36243a7e05090566f35e..616393a01c062ba99c79dd202166ef63691ece19 100644 (file)
@@ -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);