diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 17:42:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 17:42:55 -0800 |
commit | ff0bc6cc7f20cfaf9aed4055773158f3f295b28b (patch) | |
tree | ba968e3dc1fbdb730941fca5842b988fccba368c /fs | |
parent | 2182c815f3d430598e172c1c3ac88df775ea120e (diff) | |
parent | ece35848c1847cdf3dd07954578d3e99238ebbae (diff) | |
download | linux-ff0bc6cc7f20cfaf9aed4055773158f3f295b28b.tar.gz |
Merge tag 'dlm-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm update from David Teigland:
"A single change to speed up recovery times when using SCTP
connections"
* tag 'dlm-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
dlm: set zero linger time on sctp socket
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/lowcomms.c | 8 |
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, struct msghdr *msg, char *buf) { union sctp_notification *sn = (union sctp_notification *)buf; + struct linger linger; switch (sn->sn_header.sn_type) { case SCTP_SEND_FAILED: @@ -727,6 +728,13 @@ static void process_sctp_notification(struct connection *con, } add_sock(new_con->sock, new_con); + linger.l_onoff = 1; + linger.l_linger = 0; + ret = kernel_setsockopt(new_con->sock, SOL_SOCKET, SO_LINGER, + (char *)&linger, sizeof(linger)); + if (ret < 0) + log_print("set socket option SO_LINGER failed"); + log_print("connecting to %d sctp association %d", nodeid, (int)sn->sn_assoc_change.sac_assoc_id); |