void* data;
};
+typedef enum {
+ XC_MIG_STREAM_NONE, /* plain stream */
+ XC_MIG_STREAM_REMUS,
+} xc_migration_stream_t;
+
/**
* This function will save a running domain.
*
* @parm xch a handle to an open hypervisor interface
* @parm fd the file descriptor to save a domain to
* @parm dom the id of the domain
- * @param checkpointed_stream MIG_STREAM_NONE if the far end of the stream
+ * @param checkpointed_stream XC_MIG_STREAM_NONE if the far end of the stream
* doesn't use checkpointing
* @return 0 on success, -1 on failure
*/
if ( rc )
goto out;
- if ( ctx->save.debug && ctx->save.checkpointed != MIG_STREAM_NONE )
+ if ( ctx->save.debug && ctx->save.checkpointed != XC_MIG_STREAM_NONE )
{
rc = verify_frames(ctx);
if ( rc )
if ( ctx->save.live )
rc = send_domain_memory_live(ctx);
- else if ( ctx->save.checkpointed != MIG_STREAM_NONE )
+ else if ( ctx->save.checkpointed != XC_MIG_STREAM_NONE )
rc = send_domain_memory_checkpointed(ctx);
else
rc = send_domain_memory_nonlive(ctx);
if ( rc )
goto err;
- if ( ctx->save.checkpointed != MIG_STREAM_NONE )
+ if ( ctx->save.checkpointed != XC_MIG_STREAM_NONE )
{
/*
* We have now completed the initial live portion of the checkpoint
if ( rc <= 0 )
goto err;
}
- } while ( ctx->save.checkpointed != MIG_STREAM_NONE );
+ } while ( ctx->save.checkpointed != XC_MIG_STREAM_NONE );
xc_report_progress_single(xch, "End of stream");
ctx.save.checkpointed = checkpointed_stream;
/* If altering migration_stream update this assert too. */
- assert(checkpointed_stream == MIG_STREAM_NONE ||
- checkpointed_stream == MIG_STREAM_REMUS);
+ assert(checkpointed_stream == XC_MIG_STREAM_NONE ||
+ checkpointed_stream == XC_MIG_STREAM_REMUS);
/*
* TODO: Find some time to better tweak the live migration algorithm.