提交 0efeac26 编写于 作者: T Trond Myklebust

SUNRPC: Ensure xs_tcp_shutdown() requests a full close of the connection

The previous behaviour left the connection half-open in order to try
to scrape the last replies from the socket. Now that we have more reliable
reconnection, change the behaviour to close down the socket faster.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 505936f5
...@@ -627,7 +627,7 @@ static int xs_udp_send_request(struct rpc_task *task) ...@@ -627,7 +627,7 @@ static int xs_udp_send_request(struct rpc_task *task)
* @xprt: transport * @xprt: transport
* *
* Initiates a graceful shutdown of the TCP socket by calling the * Initiates a graceful shutdown of the TCP socket by calling the
* equivalent of shutdown(SHUT_WR); * equivalent of shutdown(SHUT_RDWR);
*/ */
static void xs_tcp_shutdown(struct rpc_xprt *xprt) static void xs_tcp_shutdown(struct rpc_xprt *xprt)
{ {
...@@ -635,7 +635,7 @@ static void xs_tcp_shutdown(struct rpc_xprt *xprt) ...@@ -635,7 +635,7 @@ static void xs_tcp_shutdown(struct rpc_xprt *xprt)
struct socket *sock = transport->sock; struct socket *sock = transport->sock;
if (sock != NULL) { if (sock != NULL) {
kernel_sock_shutdown(sock, SHUT_WR); kernel_sock_shutdown(sock, SHUT_RDWR);
trace_rpc_socket_shutdown(xprt, sock); trace_rpc_socket_shutdown(xprt, sock);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册