From: trondmy@kernel.org
To: linux-nfs@vger.kernel.org
Subject: [PATCH 2/3] NFSv4/pNFS: Use connections to a DS that are all of the same protocol family
Date: Fri, 6 Nov 2020 17:55:26 -0500 [thread overview]
Message-ID: <20201106225527.19148-3-trondmy@kernel.org> (raw)
In-Reply-To: <20201106225527.19148-2-trondmy@kernel.org>
From: Trond Myklebust <trond.myklebust@hammerspace.com>
If the pNFS metadata server advertises multiple addresses for the same
data server, we should try to connect to just one protocol family and
transport type on the assumption that homogeneity will improve performance.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
fs/nfs/pnfs_nfs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 679767ac258d..7027dac41cc7 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -860,6 +860,9 @@ static int _nfs4_pnfs_v3_ds_connect(struct nfs_server *mds_srv,
.addrlen = da->da_addrlen,
.servername = clp->cl_hostname,
};
+
+ if (da->da_addr.ss_family != clp->cl_addr.ss_family)
+ continue;
/* Add this address as an alias */
rpc_clnt_add_xprt(clp->cl_rpcclient, &xprt_args,
rpc_clnt_test_and_add_xprt, NULL);
@@ -920,6 +923,8 @@ static int _nfs4_pnfs_v4_ds_connect(struct nfs_server *mds_srv,
.data = &xprtdata,
};
+ if (da->da_addr.ss_family != clp->cl_addr.ss_family)
+ continue;
/**
* Test this address for session trunking and
* add as an alias
--
2.28.0
next prev parent reply other threads:[~2020-11-06 23:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 22:55 [PATCH 0/3] Add RDMA support to the pNFS file+flexfiles data channels trondmy
2020-11-06 22:55 ` [PATCH 1/3] SUNRPC: xprt_load_transport() needs to support the netid "rdma6" trondmy
2020-11-06 22:55 ` trondmy [this message]
2020-11-06 22:55 ` [PATCH 3/3] NFSv4/pNFS: Store the transport type in struct nfs4_pnfs_ds_addr trondmy
2020-11-10 16:26 ` Mkrtchyan, Tigran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201106225527.19148-3-trondmy@kernel.org \
--to=trondmy@kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox