aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorDongmao Zhang <dmzhang@suse.com>2013-12-10 11:52:22 -0500
committerDavid Teigland <teigland@redhat.com>2013-12-16 10:52:34 -0500
commitece35848c1847cdf3dd07954578d3e99238ebbae (patch)
tree609ecbded45cd4b9d05b07617ca766dc9a76e972 /fs/dlm
parent374b105797c3d4f29c685f3be535c35f5689b30e (diff)
dlm: set zero linger time on sctp socket
The recovery time for a failed node was taking a long time because the failed node could not perform the full shutdown process. Removing the linger time speeds this up. The dlm does not care what happens to messages to or from the failed node. Signed-off-by: Dongmao Zhang <dmzhang@suse.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d90909ec6aa6..a5e34dd6a32c 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -649,6 +649,7 @@ static void process_sctp_notification(struct connection *con,
649 struct msghdr *msg, char *buf) 649 struct msghdr *msg, char *buf)
650{ 650{
651 union sctp_notification *sn = (union sctp_notification *)buf; 651 union sctp_notification *sn = (union sctp_notification *)buf;
652 struct linger linger;
652 653
653 switch (sn->sn_header.sn_type) { 654 switch (sn->sn_header.sn_type) {
654 case SCTP_SEND_FAILED: 655 case SCTP_SEND_FAILED:
@@ -727,6 +728,13 @@ static void process_sctp_notification(struct connection *con,
727 } 728 }
728 add_sock(new_con->sock, new_con); 729 add_sock(new_con->sock, new_con);
729 730
731 linger.l_onoff = 1;
732 linger.l_linger = 0;
733 ret = kernel_setsockopt(new_con->sock, SOL_SOCKET, SO_LINGER,
734 (char *)&linger, sizeof(linger));
735 if (ret < 0)
736 log_print("set socket option SO_LINGER failed");
737
730 log_print("connecting to %d sctp association %d", 738 log_print("connecting to %d sctp association %d",
731 nodeid, (int)sn->sn_assoc_change.sac_assoc_id); 739 nodeid, (int)sn->sn_assoc_change.sac_assoc_id);
732 740