Commit df0afc51 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] Fix two problems with multiple concurrent nfs/tcp connects.

1/ connect requests would be get lost...
  As the comment at the top of svcsock.c says when discussing
  SK_CONN:
 *		after a set, svc_sock_enqueue must be called.

  We didn't and so lost conneciton requests.

2/ set the max accept backlog to a more reasonable number to cope
   with bursts of lots of connection requests.
parent f3b37ba1
......@@ -679,6 +679,8 @@ svc_tcp_accept(struct svc_sock *svsk)
goto failed; /* aborted connection or whatever */
}
set_bit(SK_CONN, &svsk->sk_flags);
svc_sock_enqueue(svsk);
slen = sizeof(sin);
err = ops->getname(newsock, (struct sockaddr *) &sin, &slen, 1);
if (err < 0) {
......@@ -1220,7 +1222,7 @@ svc_create_socket(struct svc_serv *serv, int protocol, struct sockaddr_in *sin)
}
if (protocol == IPPROTO_TCP) {
if ((error = sock->ops->listen(sock, 5)) < 0)
if ((error = sock->ops->listen(sock, 64)) < 0)
goto bummer;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment