[packages/lvm2] lvm2-clvmd_cmd_timeout.patch patch added
jajcus
jajcus at pld-linux.org
Wed Dec 12 12:16:36 CET 2012
commit 105f82c35ac34311f579b11520edd9eb19601a2e
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Wed Dec 12 12:15:54 2012 +0100
lvm2-clvmd_cmd_timeout.patch patch added
Fixes lvm tools lock-up during temporary cluster problems
lvm2-clvmd_cmd_timeout.patch | 32 ++++++++++++++++++++++++++++++++
lvm2.spec | 2 ++
2 files changed, 34 insertions(+)
---
diff --git a/lvm2.spec b/lvm2.spec
index a1b0e8e..f5b3c04 100644
--- 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.
diff --git a/lvm2-clvmd_cmd_timeout.patch b/lvm2-clvmd_cmd_timeout.patch
new file mode 100644
index 0000000..ba2b6f8
--- /dev/null
+++ b/lvm2-clvmd_cmd_timeout.patch
@@ -0,0 +1,32 @@
+commit 8b6c9bb794361c75b0aa96bede8a3f71d1dd663e
+Author: Jacek Konieczny <jajcus at 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 at 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;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lvm2.git/commitdiff/105f82c35ac34311f579b11520edd9eb19601a2e
More information about the pld-cvs-commit
mailing list