Skip to contentSkip to conversation

NFS: Ignore transport protocol when detecting server trunking

PATCH In review Chuck Lever 2 participants 3 messages Jan 3, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Ignore transport protocol when detecting server trunking

Detect server trunking across transport protocols. Otherwise, an RDMA mount and a TCP mount of the same server will end up with separate nfs_clients using the same clientid4.

---
Re: yesterday's discussion of "[PATCH] NFSv4.1: Fix client id trunking on Linux". This patch seems to address the behavior I mentioned.

 fs/nfs/nfs4client.c |    6 ------
 1 file changed, 6 deletions(-)
fs/nfs/nfs4client.c +0 -6
index c0fe338..c7bc38e 100644
@@ -540,9 +540,6 @@ int nfs40_walk_client_list(struct nfs_client *new,
 		if (pos->rpc_ops != new->rpc_ops)
 			continue;
 
-		if (pos->cl_proto != new->cl_proto)
-			continue;
-
 		if (pos->cl_minorversion != new->cl_minorversion)
 			continue;
 
@@ -675,9 +672,6 @@ int nfs41_walk_client_list(struct nfs_client *new,
 		if (pos->rpc_ops != new->rpc_ops)
 			continue;
 
-		if (pos->cl_proto != new->cl_proto)
-			continue;
-
 		if (pos->cl_minorversion != new->cl_minorversion)
 			continue;
 
#1 lore raw
Quoted 30 lines · Chuck Lever

Detect server trunking across transport protocols. Otherwise, an RDMA mount and a TCP mount of the same server will end up with separate nfs_clients using the same clientid4.

---
Re: yesterday's discussion of "[PATCH] NFSv4.1: Fix client id trunking on Linux". This patch seems to address the behavior I mentioned.

 fs/nfs/nfs4client.c |    6 ------
 1 file changed, 6 deletions(-)
fs/nfs/nfs4client.c +0 -3
index c0fe338..c7bc38e 100644
@@ -540,9 +540,6 @@ int nfs40_walk_client_list(struct nfs_client *new,
                if (pos->rpc_ops != new->rpc_ops)
                        continue;
 
-               if (pos->cl_proto != new->cl_proto)
-                       continue;
-
                if (pos->cl_minorversion != new->cl_minorversion)
                        continue;
 

fs/nfs/nfs4client.c int nfs41_walk_client_list(struct nfs_client *new, · line 677

Quoted 9 lines
fs/nfs/nfs4client.c +0 -3
@@ -675,9 +672,6 @@ int nfs41_walk_client_list(struct nfs_client *new,
                if (pos->rpc_ops != new->rpc_ops)
                        continue;
 
-               if (pos->cl_proto != new->cl_proto)
-                       continue;
-
                if (pos->cl_minorversion != new->cl_minorversion)
                        continue;
 

Yep. Sorry, I only noticed this after I'd written my own version. I'll replace mine with this one.

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, PrimaryData
[email protected]
#2 lore raw
Quoted 33 lines · Trond Myklebust
Quoted 32 lines · Chuck Lever

Detect server trunking across transport protocols. Otherwise, an RDMA mount and a TCP mount of the same server will end up with separate nfs_clients using the same clientid4.

---
Re: yesterday's discussion of "[PATCH] NFSv4.1: Fix client id trunking on Linux". This patch seems to address the behavior I mentioned.

fs/nfs/nfs4client.c | 6 ------

1 file changed, 6 deletions(-)
fs/nfs/nfs4client.c +0 -3
index c0fe338..c7bc38e 100644
@@ -540,9 +540,6 @@ int nfs40_walk_client_list(struct nfs_client *new,
               if (pos->rpc_ops != new->rpc_ops)
                       continue;
 
-               if (pos->cl_proto != new->cl_proto)
-                       continue;
-
               if (pos->cl_minorversion != new->cl_minorversion)
                       continue;
 
@@ -675,9 +672,6 @@ int nfs41_walk_client_list(struct nfs_client *new,
               if (pos->rpc_ops != new->rpc_ops)
                       continue;
 
Quoted 10 lines

fs/nfs/nfs4client.c int nfs40_walk_client_list(struct nfs_client *new, · line 545

Quoted 7 lines
fs/nfs/nfs4client.c +0 -3
-               if (pos->cl_proto != new->cl_proto)
-                       continue;
-
               if (pos->cl_minorversion != new->cl_minorversion)
                       continue;
 

Yep. Sorry, I only noticed this after I'd written my own version. I'll replace mine with this one.

Thanks, much appreciated!

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com