mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
rds: tcp: set linger to 1 when unloading a rds-tcp
If we are unloading the rds_tcp module, we can set linger to 1 and drop pending packets to accelerate reconnect. The peer will end up resetting the connection based on new generation numbers of the new incarnation, so hanging on to unsent TCP packets via linger is mostly pointless in this case. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Tested-by: Jenny Xu <jenny.x.xu@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
69b92b5b74
commit
c14b036681
5 changed files with 7 additions and 2 deletions
|
@ -170,6 +170,8 @@ void rds_tcp_conn_path_shutdown(struct rds_conn_path *cp)
|
|||
cp->cp_conn, tc, sock);
|
||||
|
||||
if (sock) {
|
||||
if (cp->cp_conn->c_destroy_in_prog)
|
||||
rds_tcp_set_linger(sock);
|
||||
sock->ops->shutdown(sock, RCV_SHUTDOWN | SEND_SHUTDOWN);
|
||||
lock_sock(sock->sk);
|
||||
rds_tcp_restore_callbacks(sock, tc); /* tc->tc_sock = NULL */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue