1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

If the pre_command fails then go back and wait patiently for the next

pre function rather than retrying it until we get stuck!
This commit is contained in:
Patrick Caulfield 2007-11-15 10:16:14 +00:00
parent c6f8ef3814
commit 37034fb826
2 changed files with 6 additions and 3 deletions

View File

@ -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.

View 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);