]> git.pld-linux.org Git - packages/lvm2.git/blame - lvm2-clvmd_cmd_timeout.patch
stick to utf8 for now
[packages/lvm2.git] / lvm2-clvmd_cmd_timeout.patch
CommitLineData
105f82c3
JK
1commit 8b6c9bb794361c75b0aa96bede8a3f71d1dd663e
2Author: Jacek Konieczny <jajcus@jajcus.net>
3Date: Wed Dec 12 11:59:42 2012 +0100
4
5 clvmd: command timeout handling fix
6
7 clvmd would wait for select() to time-out before processing command
8 time-outs. The select timeout would be set to the cmd_timeout ('-t'
9 command-line option) value, which is 60 seconds by default.
10
11 Normally the select() call is woken up more frequently, so the command
12 time-outs are never processed. This causes LVM tools wait forever on
13 cluster locking for operations started during temporary cluster
14 problems.
15
16 Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
17
18diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
19index eb0bffd..2b5d753 100644
20--- a/daemons/clvmd/clvmd.c
21+++ b/daemons/clvmd/clvmd.c
22@@ -939,8 +939,8 @@ static void main_loop(int local_sock, int cmd_timeout)
23 }
24 }
25
26- /* Select timed out. Check for clients that have been waiting too long for a response */
27- if (select_status == 0) {
28+ /* Check for clients that have been waiting too long for a response */
29+ if (select_status >= 0) {
30 time_t the_time = time(NULL);
31
32 for (thisfd = &local_client_head; thisfd != NULL;
This page took 0.066507 seconds and 4 git commands to generate.