]> git.decadent.org.uk Git - nfs-utils.git/commit
mount.nfs: Shorter timeout for TCP connects
authorChuck Lever <chuck.lever@oracle.com>
Fri, 3 Aug 2007 17:23:49 +0000 (13:23 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 3 Aug 2007 22:27:40 +0000 (08:27 +1000)
commit1f5420e7ecb19022236dfe7eb54dea7d508c04c8
tree19553610321b2b7ec931c1bf599b2f5bce7f01a6
parente0bd50287a907b33015b53c581040a870d8ff12a
mount.nfs: Shorter timeout for TCP connects

The standard TCP connect timeout on Linux is 75 seconds, which can be
too long in some cases.  The timeout itself can be altered on a system-wide
basis, but we'd like mount to have it's own connect timeout that's tunable,
and defaults to a shorter value.

The get_socket() function is a utility function that does TCP connects for
getport, clnt_ping, and other functions.  Add logic there to use a
non-blocking connect() and select() in order to time out a connect
operation that's taking too long.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/network.c