On Tue, 2016-01-19 at 15:17 +0800, Wen Congyang wrote:
> For example: if the secondary host is down, and we fail to send the data
> to
> the secondary host. xc_domain_save() returns 0. So in the function
> libxl__xc_domain_save_done(), rc is 0 (the helper program exits
> normally),
> and retval is 0 (it is xc_domain_save()'s return value). In such case, we
> just need to complete the stream.
> 
> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com>
> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>
> ---
>  tools/libxl/libxl.h              |  4 ++++
>  tools/libxl/libxl_stream_write.c | 14 ++++++++++++--
>  2 files changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> index 7114491..df6c7a3 100644
> --- a/tools/libxl/libxl.h
> +++ b/tools/libxl/libxl.h
> @@ -1215,6 +1215,10 @@ int libxl_domain_resume(libxl_ctx *ctx, uint32_t
> domid, int suspend_cancel,
>                          const libxl_asyncop_how *ao_how)
>                          LIBXL_EXTERNAL_CALLERS_ONLY;
>  
> +/*
> + * This function doesn't return until something is wrong, and we need to
> + * do failover from secondary.

This function runs on the primary, doesn't it? and failover would be from
primary to secondary.

So I think a more accurate wording would be:

/*
 * This function doesn't return unless something has gone wrong with the
 * replication to the secondary. If this function returns then the caller 
 * should resume the (primary) domain.
 */

I'm happy to edit the text on commit if you agree with the proposed
wording. The code looks good.

Thanks,
Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to