Switch the mirror commit_signal to an mbox

At the moment, a first-pass failed migration will retry. This is wrong,
it should abort.  However, to make that happen the mirror supervisor
needs to know the commit state of the mirror thread.  With a self_pipe
mirror commit signal that information wasn't there.
This commit is contained in:
Alex Young
2012-07-15 19:46:35 +01:00
parent 5794913fdf
commit a10adf007c
2 changed files with 46 additions and 39 deletions

View File

@@ -9,6 +9,7 @@
#include "self_pipe.h"
enum mirror_state;
#include "serve.h"
#include "mbox.h"
/* MS_CONNECT_TIME_SECS
@@ -71,12 +72,12 @@ struct mirror {
char *mapped;
struct bitset_mapping *dirty_map;
enum mirror_state commit_state;
enum mirror_state commit_state;
/* commit_signal is sent immediately after attempting to connect
* and checking the remote size, whether successful or not.
*/
struct self_pipe * commit_signal;
struct mbox * commit_signal;
};