]> sourceware.org Git - lvm2.git/commitdiff
If the pre_command fails then go back and wait patiently for the next
authorPatrick Caulfield <pcaulfie@redhat.com>
Thu, 15 Nov 2007 10:16:14 +0000 (10:16 +0000)
committerPatrick Caulfield <pcaulfie@redhat.com>
Thu, 15 Nov 2007 10:16:14 +0000 (10:16 +0000)
pre function rather than retrying it until we get stuck!

WHATS_NEW
daemons/clvmd/clvmd.c

index c3dcd819ed0b816bdb20e23127f5d0a7fe9f8cb3..c273a92afdef26e609466e3682b578ed0c27f927 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.29 -
 ==================================
+  Stop clvmd going haywire if a pre_function fails.
   Convert some vg_reads into vg_lock_and_reads.
   Avoid nested vg_reads when processing PVs in VGs and fix associated locking.
   Accept sizes with --readahead argument.
index deafecbdbce5644747bc3c0a5e5b6b1752ace0da..678ee4889e4a97ad084257a198d973cd56608c97 100644 (file)
@@ -1379,8 +1379,10 @@ static __attribute__ ((noreturn)) void *pre_and_post_thread(void *arg)
                        break;
                } while(1);
 
-               if (status)
-                       continue; /* Wait for another PRE command */
+               if (status) {
+                       client->bits.localsock.state = POST_COMMAND;
+                       goto next_pre;
+               }
 
                /* We may need to wait for the condition variable before running the post command */
                pthread_mutex_lock(&client->bits.localsock.mutex);
@@ -1409,7 +1411,7 @@ static __attribute__ ((noreturn)) void *pre_and_post_thread(void *arg)
                        log_error("Error sending to pipe: %m\n");
                        break;
                } while(1);
-
+next_pre:
                DEBUGLOG("Waiting for next pre command\n");
 
                pthread_mutex_lock(&client->bits.localsock.mutex);
This page took 0.040925 seconds and 5 git commands to generate.