]> git.michaelhowe.org Git - packages/o/openafs.git/commit
vol: Add timeouts to SYNC server select() calls
authorAndrew Deason <adeason@sinenomine.net>
Tue, 29 Mar 2011 17:28:46 +0000 (12:28 -0500)
committerDerrick Brashear <shadow@dementix.org>
Thu, 15 Dec 2011 14:58:14 +0000 (06:58 -0800)
commitcd69fb1401bc7d9803fb26c7b5e9256efa0167d4
treede7666642c08f0741e89696cf963947ebeb96a3c
parentd69d96588ba1068b9ace1156f00e6c26a145e089
vol: Add timeouts to SYNC server select() calls

Normally *SYNC server processes wait indefinitely for activity to
occur on one of the SYNC sockets. On some Linux kernels, there exists
a race condition where data can come in on a socket, but the select()
call continues to wait. To ensure that we do not hang forever in such
a scenario, add a timeout to the select() call, which will ensure we
notice the new data within 10 seconds. Raise the timeout on non-Linux
to reduce impact elsewhere.

The Linux kernel bug is tracked in
<https://bugzilla.redhat.com/show_bug.cgi?id=494404>, though that bug
report may not represent all affected kernels.

Reviewed-on: http://gerrit.openafs.org/4377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 920a00e075b679f59e31b9fcbe7f5db15e345a95)

Change-Id: Iae4035bc952b66f88843d51ff341b0576f15163d
Reviewed-on: http://gerrit.openafs.org/6276
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/vol/daemon_com.h
src/vol/fssync-server.c
src/vol/salvsync-server.c