]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
SUNRPC: Add the equivalent of the linger and linger2 timeouts to RPC sockets
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Mar 2009 18:38:03 +0000 (14:38 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 19 Mar 2009 19:17:34 +0000 (15:17 -0400)
commit7d1e8255cf959fba7ee2317550dfde39f0b936ae
tree0a046b83e5ac29501849c34408059480d4c210be
parent5e3771ce2d6a69e10fcc870cdf226d121d868491
SUNRPC: Add the equivalent of the linger and linger2 timeouts to RPC sockets

This fixes a regression against FreeBSD servers as reported by Tomas
Kasparek. Apparently when using RPC over a TCP socket, the FreeBSD servers
don't ever react to the client closing the socket, and so commit
e06799f958bf7f9f8fae15f0c6f519953fb0257c (SUNRPC: Use shutdown() instead of
close() when disconnecting a TCP socket) causes the setup to hang forever
whenever the client attempts to close and then reconnect.

We break the deadlock by adding a 'linger2' style timeout to the socket,
after which, the client will abort the connection using a TCP 'RST'.

The default timeout is set to 15 seconds. A subsequent patch will put it
under user control by means of a systctl.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/xprt.h
net/sunrpc/xprtsock.c