diff options
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 7bc3c178ccb3..eee5ac96e177 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -307,12 +307,6 @@ static void xs_format_common_peer_addresses(struct rpc_xprt *xprt) | |||
307 | (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); | 307 | (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); |
308 | xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL); | 308 | xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL); |
309 | 309 | ||
310 | (void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=%s", | ||
311 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
312 | xprt->address_strings[RPC_DISPLAY_PORT], | ||
313 | xprt->address_strings[RPC_DISPLAY_PROTO]); | ||
314 | xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL); | ||
315 | |||
316 | (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap)); | 310 | (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap)); |
317 | xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL); | 311 | xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL); |
318 | } | 312 | } |
@@ -1721,8 +1715,11 @@ static void xs_udp_connect_worker4(struct work_struct *work) | |||
1721 | goto out; | 1715 | goto out; |
1722 | } | 1716 | } |
1723 | 1717 | ||
1724 | dprintk("RPC: worker connecting xprt %p to address: %s\n", | 1718 | dprintk("RPC: worker connecting xprt %p via %s to " |
1725 | xprt, xprt->address_strings[RPC_DISPLAY_ALL]); | 1719 | "%s (port %s)\n", xprt, |
1720 | xprt->address_strings[RPC_DISPLAY_PROTO], | ||
1721 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
1722 | xprt->address_strings[RPC_DISPLAY_PORT]); | ||
1726 | 1723 | ||
1727 | xs_udp_finish_connecting(xprt, sock); | 1724 | xs_udp_finish_connecting(xprt, sock); |
1728 | status = 0; | 1725 | status = 0; |
@@ -1763,8 +1760,11 @@ static void xs_udp_connect_worker6(struct work_struct *work) | |||
1763 | goto out; | 1760 | goto out; |
1764 | } | 1761 | } |
1765 | 1762 | ||
1766 | dprintk("RPC: worker connecting xprt %p to address: %s\n", | 1763 | dprintk("RPC: worker connecting xprt %p via %s to " |
1767 | xprt, xprt->address_strings[RPC_DISPLAY_ALL]); | 1764 | "%s (port %s)\n", xprt, |
1765 | xprt->address_strings[RPC_DISPLAY_PROTO], | ||
1766 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
1767 | xprt->address_strings[RPC_DISPLAY_PORT]); | ||
1768 | 1768 | ||
1769 | xs_udp_finish_connecting(xprt, sock); | 1769 | xs_udp_finish_connecting(xprt, sock); |
1770 | status = 0; | 1770 | status = 0; |
@@ -1889,8 +1889,11 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt, | |||
1889 | goto out_eagain; | 1889 | goto out_eagain; |
1890 | } | 1890 | } |
1891 | 1891 | ||
1892 | dprintk("RPC: worker connecting xprt %p to address: %s\n", | 1892 | dprintk("RPC: worker connecting xprt %p via %s to " |
1893 | xprt, xprt->address_strings[RPC_DISPLAY_ALL]); | 1893 | "%s (port %s)\n", xprt, |
1894 | xprt->address_strings[RPC_DISPLAY_PROTO], | ||
1895 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
1896 | xprt->address_strings[RPC_DISPLAY_PORT]); | ||
1894 | 1897 | ||
1895 | status = xs_tcp_finish_connecting(xprt, sock); | 1898 | status = xs_tcp_finish_connecting(xprt, sock); |
1896 | dprintk("RPC: %p connect status %d connected %d sock state %d\n", | 1899 | 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 | return ERR_PTR(-EAFNOSUPPORT); | 2231 | return ERR_PTR(-EAFNOSUPPORT); |
2229 | } | 2232 | } |
2230 | 2233 | ||
2231 | dprintk("RPC: set up transport to address %s\n", | 2234 | if (xprt_bound(xprt)) |
2232 | xprt->address_strings[RPC_DISPLAY_ALL]); | 2235 | dprintk("RPC: set up xprt to %s (port %s) via %s\n", |
2236 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
2237 | xprt->address_strings[RPC_DISPLAY_PORT], | ||
2238 | xprt->address_strings[RPC_DISPLAY_PROTO]); | ||
2239 | else | ||
2240 | dprintk("RPC: set up xprt to %s (autobind) via %s\n", | ||
2241 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
2242 | xprt->address_strings[RPC_DISPLAY_PROTO]); | ||
2233 | 2243 | ||
2234 | if (try_module_get(THIS_MODULE)) | 2244 | if (try_module_get(THIS_MODULE)) |
2235 | return xprt; | 2245 | return xprt; |
@@ -2293,8 +2303,16 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) | |||
2293 | return ERR_PTR(-EAFNOSUPPORT); | 2303 | return ERR_PTR(-EAFNOSUPPORT); |
2294 | } | 2304 | } |
2295 | 2305 | ||
2296 | dprintk("RPC: set up transport to address %s\n", | 2306 | if (xprt_bound(xprt)) |
2297 | xprt->address_strings[RPC_DISPLAY_ALL]); | 2307 | dprintk("RPC: set up xprt to %s (port %s) via %s\n", |
2308 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
2309 | xprt->address_strings[RPC_DISPLAY_PORT], | ||
2310 | xprt->address_strings[RPC_DISPLAY_PROTO]); | ||
2311 | else | ||
2312 | dprintk("RPC: set up xprt to %s (autobind) via %s\n", | ||
2313 | xprt->address_strings[RPC_DISPLAY_ADDR], | ||
2314 | xprt->address_strings[RPC_DISPLAY_PROTO]); | ||
2315 | |||
2298 | 2316 | ||
2299 | if (try_module_get(THIS_MODULE)) | 2317 | if (try_module_get(THIS_MODULE)) |
2300 | return xprt; | 2318 | return xprt; |