[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V4 7/8] COLO-Proxy: Use socket to get checkpoint event.



On Mon, Mar 06, 2017 at 10:59:25AM +0800, Zhang Chen wrote:
> We use kernel colo proxy's way to get the checkpoint event
> from qemu colo-compare.
> Qemu colo-compare need add a API to support this(I will add this in qemu).
> Qemu side patch:
>  https://lists.nongnu.org/archive/html/qemu-devel/2017-02/msg07265.html
> 
> Signed-off-by: Zhang Chen <zhangchen.fnst@xxxxxxxxxxxxxx>

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

But see below.

> @@ -289,8 +393,19 @@ int colo_proxy_checkpoint(libxl__colo_proxy_state *cps,
>       * event.
>       */
>      if (cps->is_userspace_proxy) {
> -        usleep(timeout_us);
> -        return 0;
> +        ret = colo_userspace_proxy_recv(cps, recvbuff, timeout_us);
> +        if (ret <= 0) {
> +            ret = 0;
> +            goto out1;
> +        }
> +
> +        if (!strcmp(recvbuff, "DO_CHECKPOINT")) {
> +            ret = 1;
> +        } else {
> +            LOGD(ERROR, ao->domid, "receive qemu colo-compare checkpoint 
> error");
> +            ret = 0;
> +        }
> +        goto out1;
>      }
>  
>      size = colo_proxy_recv(cps, &buff, timeout_us);
> @@ -318,4 +433,7 @@ int colo_proxy_checkpoint(libxl__colo_proxy_state *cps,
>  out:
>      free(buff);
>      return ret;
> +
> +out1:

Perhaps try to come up with a better name than out1? Subsequent patch is
welcome.

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.