]> git.pld-linux.org Git - packages/lvm2.git/commitdiff
lvm2-clvmd_cmd_timeout.patch patch added auto/ti/lvm2-2.02.98-2
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Wed, 12 Dec 2012 11:15:54 +0000 (12:15 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Wed, 12 Dec 2012 11:15:54 +0000 (12:15 +0100)
Fixes lvm tools lock-up during temporary cluster problems

lvm2-clvmd_cmd_timeout.patch [new file with mode: 0644]
lvm2.spec

diff --git a/lvm2-clvmd_cmd_timeout.patch b/lvm2-clvmd_cmd_timeout.patch
new file mode 100644 (file)
index 0000000..ba2b6f8
--- /dev/null
@@ -0,0 +1,32 @@
+commit 8b6c9bb794361c75b0aa96bede8a3f71d1dd663e
+Author: Jacek Konieczny <jajcus@jajcus.net>
+Date:   Wed Dec 12 11:59:42 2012 +0100
+
+    clvmd: command timeout handling fix
+    
+    clvmd would wait for select() to time-out before processing command
+    time-outs. The select timeout would be set to the cmd_timeout ('-t'
+    command-line option) value, which is 60 seconds by default.
+    
+    Normally the select() call is woken up more frequently, so the command
+    time-outs are never processed. This causes LVM tools wait forever on
+    cluster locking for operations started during temporary cluster
+    problems.
+    
+    Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
+
+diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
+index eb0bffd..2b5d753 100644
+--- a/daemons/clvmd/clvmd.c
++++ b/daemons/clvmd/clvmd.c
+@@ -939,8 +939,8 @@ static void main_loop(int local_sock, int cmd_timeout)
+                       }
+               }
+-              /* Select timed out. Check for clients that have been waiting too long for a response */
+-              if (select_status == 0) {
++              /* Check for clients that have been waiting too long for a response */
++              if (select_status >= 0) {
+                       time_t the_time = time(NULL);
+                       for (thisfd = &local_client_head; thisfd != NULL;
index a1b0e8e61457d2b620533d02140b93e403e0d6e9..f5b3c048a6e3452b24916b7ed1c141c65fdfdbd6 100644 (file)
--- a/lvm2.spec
+++ b/lvm2.spec
@@ -51,6 +51,7 @@ Patch4:               dl-dlsym.patch
 Patch5:                %{name}-wrapper.patch
 Patch6:                %{name}-lvm_path.patch
 Patch7:                %{name}-sd_notify.patch
+Patch8:                %{name}-clvmd_cmd_timeout.patch
 URL:           http://sources.redhat.com/lvm2/
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
@@ -263,6 +264,7 @@ potrzeby initrd.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 # do not force --export-symbol linker option for e.g. statically linked executables
 # -rdynamic compiler option drives linker in the right way.
This page took 0.20131 seconds and 4 git commands to generate.