]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFS: enable nconnect for RDMA
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 13 Feb 2024 18:31:47 +0000 (13:31 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2024 14:14:51 +0000 (09:14 -0500)
It appears that in certain cases, RDMA capable transports can benefit
from the ability to establish multiple connections to increase their
throughput. This patch therefore enables the use of the "nconnect" mount
option for those use cases.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs3client.c
fs/nfs/nfs4client.c

index 674c012868b1a250b869e6586496db24915ce7da..b0c8a39c2bbdeab011a468a6b267d20a8d8ce91e 100644 (file)
@@ -111,6 +111,7 @@ struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv,
        cl_init.hostname = buf;
 
        switch (ds_proto) {
+       case XPRT_TRANSPORT_RDMA:
        case XPRT_TRANSPORT_TCP:
        case XPRT_TRANSPORT_TCP_TLS:
                if (mds_clp->cl_nconnect > 1)
index 11e3a285594c231c6b887dc53edbe52ef8519b23..84573df5cf5ae57616efb4d3c1b8c7556d30bc47 100644 (file)
@@ -924,6 +924,7 @@ static int nfs4_set_client(struct nfs_server *server,
        else
                cl_init.max_connect = max_connect;
        switch (proto) {
+       case XPRT_TRANSPORT_RDMA:
        case XPRT_TRANSPORT_TCP:
        case XPRT_TRANSPORT_TCP_TLS:
                cl_init.nconnect = nconnect;
@@ -1000,6 +1001,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv,
        cl_init.hostname = buf;
 
        switch (ds_proto) {
+       case XPRT_TRANSPORT_RDMA:
        case XPRT_TRANSPORT_TCP:
        case XPRT_TRANSPORT_TCP_TLS:
                if (mds_clp->cl_nconnect > 1) {