Skip to content

Commit 025bb9f

Browse files
chuckleverTrond Myklebust
authored andcommitted
NFSv4.0: Remove transport protocol name from non-UCS client ID
Commit 69dd716 ("NFSv4: Add socket proto argument to setclientid") (2007) added the transport protocol name to the client ID string, but the patch description doesn't explain why this was necessary. At that time, the only transport protocol name that would have been used is "tcp" (for both IPv4 and IPv6), resulting in no additional distinctiveness of the client ID string. Since there is one client instance, the server should recognize it's state whether the client is connecting via TCP or RDMA. Same client, same lease. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 848a4eb commit 025bb9f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

fs/nfs/nfs4proc.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5622,8 +5622,6 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
56225622
strlen(clp->cl_rpcclient->cl_nodename) +
56235623
1 +
56245624
strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) +
5625-
1 +
5626-
strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_PROTO)) +
56275625
1;
56285626
rcu_read_unlock();
56295627
if (nfs4_client_id_uniquifier[0] != '\0')
@@ -5642,20 +5640,16 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
56425640

56435641
rcu_read_lock();
56445642
if (nfs4_client_id_uniquifier[0] != '\0')
5645-
scnprintf(str, len, "Linux NFSv4.0 %s/%s/%s %s",
5643+
scnprintf(str, len, "Linux NFSv4.0 %s/%s/%s",
56465644
clp->cl_rpcclient->cl_nodename,
56475645
nfs4_client_id_uniquifier,
56485646
rpc_peeraddr2str(clp->cl_rpcclient,
5649-
RPC_DISPLAY_ADDR),
5650-
rpc_peeraddr2str(clp->cl_rpcclient,
5651-
RPC_DISPLAY_PROTO));
5647+
RPC_DISPLAY_ADDR));
56525648
else
5653-
scnprintf(str, len, "Linux NFSv4.0 %s/%s %s",
5649+
scnprintf(str, len, "Linux NFSv4.0 %s/%s",
56545650
clp->cl_rpcclient->cl_nodename,
56555651
rpc_peeraddr2str(clp->cl_rpcclient,
5656-
RPC_DISPLAY_ADDR),
5657-
rpc_peeraddr2str(clp->cl_rpcclient,
5658-
RPC_DISPLAY_PROTO));
5652+
RPC_DISPLAY_ADDR));
56595653
rcu_read_unlock();
56605654

56615655
clp->cl_owner_id = str;

0 commit comments

Comments
 (0)