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
This commit is contained in:
@@ -649,6 +649,7 @@ static void process_sctp_notification(struct connection *con,
|
|||||||
struct msghdr *msg, char *buf)
|
struct msghdr *msg, char *buf)
|
||||||
{
|
{
|
||||||
union sctp_notification *sn = (union sctp_notification *)buf;
|
union sctp_notification *sn = (union sctp_notification *)buf;
|
||||||
|
struct linger linger;
|
||||||
|
|
||||||
switch (sn->sn_header.sn_type) {
|
switch (sn->sn_header.sn_type) {
|
||||||
case SCTP_SEND_FAILED:
|
case SCTP_SEND_FAILED:
|
||||||
@@ -727,6 +728,13 @@ static void process_sctp_notification(struct connection *con,
|
|||||||
}
|
}
|
||||||
add_sock(new_con->sock, new_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",
|
log_print("connecting to %d sctp association %d",
|
||||||
nodeid, (int)sn->sn_assoc_change.sac_assoc_id);
|
nodeid, (int)sn->sn_assoc_change.sac_assoc_id);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user