From: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
To: Xen devel <xen-devel@lists.xenproject.org>,
Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Yang Hongyang <imhy.yang@gmail.com>,
Bian Naimeng <biannm@cn.fujitsu.com>,
eddie <eddie.dong@intel.com>,
Li Zhijian <lizhijian@cn.fujitsu.com>,
Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Subject: [PATCH RFC V2 3/7] tools/libxl: refactor do_domain_create()
Date: Wed, 15 Feb 2017 17:54:29 +0800 [thread overview]
Message-ID: <1487152473-3693-4-git-send-email-zhangchen.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1487152473-3693-1-git-send-email-zhangchen.fnst@cn.fujitsu.com>
We use params->colo_proxy_script to make do_domain_create()
doesn't take "colo_proxy_script" anymore.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
---
tools/libxl/libxl_create.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index e3bc257..e741b9a 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1608,7 +1608,6 @@ static void domain_create_cb(libxl__egc *egc,
static int do_domain_create(libxl_ctx *ctx, libxl_domain_config *d_config,
uint32_t *domid, int restore_fd, int send_back_fd,
const libxl_domain_restore_params *params,
- const char *colo_proxy_script,
const libxl_asyncop_how *ao_how,
const libxl_asyncprogress_how *aop_console_how)
{
@@ -1632,7 +1631,14 @@ static int do_domain_create(libxl_ctx *ctx, libxl_domain_config *d_config,
}
cdcs->dcs.callback = domain_create_cb;
cdcs->dcs.domid_soft_reset = INVALID_DOMID;
- cdcs->dcs.colo_proxy_script = colo_proxy_script;
+
+ if (cdcs->dcs.restore_params.checkpointed_stream ==
+ LIBXL_CHECKPOINTED_STREAM_COLO)
+ cdcs->dcs.colo_proxy_script =
+ cdcs->dcs.restore_params.colo_proxy_script;
+ else
+ cdcs->dcs.colo_proxy_script = NULL;
+
libxl__ao_progress_gethow(&cdcs->dcs.aop_console_how, aop_console_how);
cdcs->domid_out = domid;
@@ -1820,7 +1826,7 @@ int libxl_domain_create_new(libxl_ctx *ctx, libxl_domain_config *d_config,
const libxl_asyncprogress_how *aop_console_how)
{
unset_disk_colo_restore(d_config);
- return do_domain_create(ctx, d_config, domid, -1, -1, NULL, NULL,
+ return do_domain_create(ctx, d_config, domid, -1, -1, NULL,
ao_how, aop_console_how);
}
@@ -1831,17 +1837,14 @@ int libxl_domain_create_restore(libxl_ctx *ctx, libxl_domain_config *d_config,
const libxl_asyncop_how *ao_how,
const libxl_asyncprogress_how *aop_console_how)
{
- char *colo_proxy_script = NULL;
-
if (params->checkpointed_stream == LIBXL_CHECKPOINTED_STREAM_COLO) {
- colo_proxy_script = params->colo_proxy_script;
set_disk_colo_restore(d_config);
} else {
unset_disk_colo_restore(d_config);
}
return do_domain_create(ctx, d_config, domid, restore_fd, send_back_fd,
- params, colo_proxy_script, ao_how, aop_console_how);
+ params, ao_how, aop_console_how);
}
int libxl_domain_soft_reset(libxl_ctx *ctx,
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-15 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 9:54 [PATCH RFC V2 0/7] COLO-Proxy: Make Xen COLO use userspace colo-proxy Zhang Chen
2017-02-15 9:54 ` [PATCH RFC V2 1/7] COLO-Proxy: Add remus command to open userspace proxy Zhang Chen
2017-02-15 9:54 ` [PATCH RFC V2 2/7] COLO-Proxy: Setup userspace colo-proxy on primary side Zhang Chen
2017-02-15 9:54 ` Zhang Chen [this message]
2017-02-15 9:54 ` [PATCH RFC V2 4/7] COLO-Proxy: Setup userspace colo-proxy on secondary side Zhang Chen
2017-02-15 9:54 ` [PATCH RFC V2 5/7] COLO-Proxy: Add primary userspace colo proxy start args Zhang Chen
2017-02-15 9:54 ` [PATCH RFC V2 6/7] COLO-Proxy: Add secondary userspace colo-proxy " Zhang Chen
2017-02-15 9:54 ` [PATCH RFC V2 7/7] COLO-Proxy: Use socket to get checkpoint event Zhang Chen
2017-02-15 16:24 ` Konrad Rzeszutek Wilk
2017-02-16 1:48 ` Zhang Chen
2017-02-15 16:18 ` [PATCH RFC V2 0/7] COLO-Proxy: Make Xen COLO use userspace colo-proxy Konrad Rzeszutek Wilk
2017-02-16 1:36 ` Zhang Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487152473-3693-4-git-send-email-zhangchen.fnst@cn.fujitsu.com \
--to=zhangchen.fnst@cn.fujitsu.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=biannm@cn.fujitsu.com \
--cc=eddie.dong@intel.com \
--cc=imhy.yang@gmail.com \
--cc=lizhijian@cn.fujitsu.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).