From: Trond Myklebust Date: Thu, 27 Apr 2017 15:22:07 +0000 (-0400) Subject: pNFS: Allow multiple connections to the DS X-Git-Tag: v5.15~5886^2~26^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb71e4a5d7eb151aa8d4e98c628b744f78af7c57;p=platform%2Fkernel%2Flinux-starfive.git pNFS: Allow multiple connections to the DS If the user specifies -onconnect= mount option, and the transport protocol is TCP, then set up connections to the pNFS data server as well. The connections will all go to the same IP address. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c index fb0c425..148ceb7 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 5c244c4..616393a 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);