Commit c740eff8 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

SUNRPC: Kill RPC_DISPLAY_ALL

At some point, I recall that rpc_pipe_fs used RPC_DISPLAY_ALL.
Currently there are no uses of RPC_DISPLAY_ALL outside the transport
modules themselves, so we can safely get rid of it.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent fbfffbd5
...@@ -38,7 +38,6 @@ enum rpc_display_format_t { ...@@ -38,7 +38,6 @@ enum rpc_display_format_t {
RPC_DISPLAY_ADDR = 0, RPC_DISPLAY_ADDR = 0,
RPC_DISPLAY_PORT, RPC_DISPLAY_PORT,
RPC_DISPLAY_PROTO, RPC_DISPLAY_PROTO,
RPC_DISPLAY_ALL,
RPC_DISPLAY_HEX_ADDR, RPC_DISPLAY_HEX_ADDR,
RPC_DISPLAY_HEX_PORT, RPC_DISPLAY_HEX_PORT,
RPC_DISPLAY_NETID, RPC_DISPLAY_NETID,
......
...@@ -181,11 +181,6 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt) ...@@ -181,11 +181,6 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma"; xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
(void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=rdma",
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT]);
xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL);
(void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x", (void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
NIPQUAD(sin->sin_addr.s_addr)); NIPQUAD(sin->sin_addr.s_addr));
xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
......
...@@ -307,12 +307,6 @@ static void xs_format_common_peer_addresses(struct rpc_xprt *xprt) ...@@ -307,12 +307,6 @@ static void xs_format_common_peer_addresses(struct rpc_xprt *xprt)
(void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL); xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
(void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=%s",
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT],
xprt->address_strings[RPC_DISPLAY_PROTO]);
xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL);
(void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap)); (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL); xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
} }
...@@ -1721,8 +1715,11 @@ static void xs_udp_connect_worker4(struct work_struct *work) ...@@ -1721,8 +1715,11 @@ static void xs_udp_connect_worker4(struct work_struct *work)
goto out; goto out;
} }
dprintk("RPC: worker connecting xprt %p to address: %s\n", dprintk("RPC: worker connecting xprt %p via %s to "
xprt, xprt->address_strings[RPC_DISPLAY_ALL]); "%s (port %s)\n", xprt,
xprt->address_strings[RPC_DISPLAY_PROTO],
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT]);
xs_udp_finish_connecting(xprt, sock); xs_udp_finish_connecting(xprt, sock);
status = 0; status = 0;
...@@ -1763,8 +1760,11 @@ static void xs_udp_connect_worker6(struct work_struct *work) ...@@ -1763,8 +1760,11 @@ static void xs_udp_connect_worker6(struct work_struct *work)
goto out; goto out;
} }
dprintk("RPC: worker connecting xprt %p to address: %s\n", dprintk("RPC: worker connecting xprt %p via %s to "
xprt, xprt->address_strings[RPC_DISPLAY_ALL]); "%s (port %s)\n", xprt,
xprt->address_strings[RPC_DISPLAY_PROTO],
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT]);
xs_udp_finish_connecting(xprt, sock); xs_udp_finish_connecting(xprt, sock);
status = 0; status = 0;
...@@ -1889,8 +1889,11 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt, ...@@ -1889,8 +1889,11 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt,
goto out_eagain; goto out_eagain;
} }
dprintk("RPC: worker connecting xprt %p to address: %s\n", dprintk("RPC: worker connecting xprt %p via %s to "
xprt, xprt->address_strings[RPC_DISPLAY_ALL]); "%s (port %s)\n", xprt,
xprt->address_strings[RPC_DISPLAY_PROTO],
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT]);
status = xs_tcp_finish_connecting(xprt, sock); status = xs_tcp_finish_connecting(xprt, sock);
dprintk("RPC: %p connect status %d connected %d sock state %d\n", dprintk("RPC: %p connect status %d connected %d sock state %d\n",
...@@ -2228,8 +2231,15 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args) ...@@ -2228,8 +2231,15 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
return ERR_PTR(-EAFNOSUPPORT); return ERR_PTR(-EAFNOSUPPORT);
} }
dprintk("RPC: set up transport to address %s\n", if (xprt_bound(xprt))
xprt->address_strings[RPC_DISPLAY_ALL]); dprintk("RPC: set up xprt to %s (port %s) via %s\n",
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT],
xprt->address_strings[RPC_DISPLAY_PROTO]);
else
dprintk("RPC: set up xprt to %s (autobind) via %s\n",
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PROTO]);
if (try_module_get(THIS_MODULE)) if (try_module_get(THIS_MODULE))
return xprt; return xprt;
...@@ -2293,8 +2303,16 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) ...@@ -2293,8 +2303,16 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
return ERR_PTR(-EAFNOSUPPORT); return ERR_PTR(-EAFNOSUPPORT);
} }
dprintk("RPC: set up transport to address %s\n", if (xprt_bound(xprt))
xprt->address_strings[RPC_DISPLAY_ALL]); dprintk("RPC: set up xprt to %s (port %s) via %s\n",
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PORT],
xprt->address_strings[RPC_DISPLAY_PROTO]);
else
dprintk("RPC: set up xprt to %s (autobind) via %s\n",
xprt->address_strings[RPC_DISPLAY_ADDR],
xprt->address_strings[RPC_DISPLAY_PROTO]);
if (try_module_get(THIS_MODULE)) if (try_module_get(THIS_MODULE))
return xprt; return xprt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment