[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/libxl: rename libxl__domain_suspend to libxl__domain_save
commit 73db059d35ed48d8ae5ba0d9d9323a15c3d47907 Author: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> AuthorDate: Wed Jun 3 10:57:28 2015 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Jul 21 14:08:13 2015 +0100 tools/libxl: rename libxl__domain_suspend to libxl__domain_save The suspend/save terminology used by libxc is more consistent. "suspend" refers to quiescing the VM, so pausing qemu, making a remote_shutdown(SHUTDOWN_suspend) hypercall etc. "save" refers to the actions involved in actually shuffling the state of the VM, so xc_domain_save() etc. libxl currently uses "suspend" to encapsulate both. The patch Rename libxl__domain_suspend() to libxl__domain_save() since it actually refers to shuffling the state of the VM. This results in some strangeness in that some functions called *save* are now passed a struct called *suspend*, this is temporary and is all fixed up later by the refactoring of the suspend_state. Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> Some comments, commit messages: Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx> --- tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl_dom.c | 16 ++++++++-------- tools/libxl/libxl_internal.h | 13 ++++++++++--- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 3fe1b99..dbbce17 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -921,7 +921,7 @@ static void libxl__remus_setup_done(libxl__egc *egc, STATE_AO_GC(dss->ao); if (!rc) { - libxl__domain_suspend(egc, dss); + libxl__domain_save(egc, dss); return; } @@ -988,7 +988,7 @@ int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd, int flags, dss->live = flags & LIBXL_SUSPEND_LIVE; dss->debug = flags & LIBXL_SUSPEND_DEBUG; - libxl__domain_suspend(egc, dss); + libxl__domain_save(egc, dss); return AO_INPROGRESS; out_err: diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 4cb247a..ddd94bf 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1155,8 +1155,8 @@ out: static void stream_done(libxl__egc *egc, libxl__stream_write_state *sws, int rc); -static void domain_suspend_done(libxl__egc *egc, - libxl__domain_suspend_state *dss, int rc); +static void domain_save_done(libxl__egc *egc, + libxl__domain_suspend_state *dss, int rc); static void domain_suspend_callback_common_done(libxl__egc *egc, libxl__domain_suspend_state *dss, int rc); @@ -2039,9 +2039,9 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev, libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, !rc); } -/*----- main code for suspending, in order of execution -----*/ +/*----- main code for saving, in order of execution -----*/ -void libxl__domain_suspend(libxl__egc *egc, libxl__domain_suspend_state *dss) +void libxl__domain_save(libxl__egc *egc, libxl__domain_suspend_state *dss) { STATE_AO_GC(dss->ao); int port; @@ -2128,13 +2128,13 @@ void libxl__domain_suspend(libxl__egc *egc, libxl__domain_suspend_state *dss) return; out: - domain_suspend_done(egc, dss, rc); + domain_save_done(egc, dss, rc); } static void stream_done(libxl__egc *egc, libxl__stream_write_state *sws, int rc) { - domain_suspend_done(egc, sws->dss, rc); + domain_save_done(egc, sws->dss, rc); } static void save_device_model_datacopier_done(libxl__egc *egc, @@ -2232,8 +2232,8 @@ static void remus_teardown_done(libxl__egc *egc, libxl__remus_devices_state *rds, int rc); -static void domain_suspend_done(libxl__egc *egc, - libxl__domain_suspend_state *dss, int rc) +static void domain_save_done(libxl__egc *egc, + libxl__domain_suspend_state *dss, int rc) { STATE_AO_GC(dss->ao); diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 2b6b2a0..211118c 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -2959,6 +2959,13 @@ static inline bool libxl__conversion_helper_inuse /*----- Domain suspend (save) state structure -----*/ +/* + * "suspend" refers to quiescing the VM, so pausing qemu, making a + * remote_shutdown(SHUTDOWN_suspend) hypercall etc. + * + * "save" refers to the actions involved in actually shuffling the + * state of the VM, so xc_domain_save() etc. + */ typedef struct libxl__domain_suspend_state libxl__domain_suspend_state; @@ -3023,7 +3030,7 @@ typedef struct libxl__logdirty_switch { } libxl__logdirty_switch; struct libxl__domain_suspend_state { - /* set by caller of libxl__domain_suspend */ + /* set by caller of libxl__domain_save */ libxl__ao *ao; libxl__domain_suspend_cb *callback; @@ -3388,8 +3395,8 @@ struct libxl__domain_create_state { /*----- Domain suspend (save) functions -----*/ /* calls dss->callback when done */ -_hidden void libxl__domain_suspend(libxl__egc *egc, - libxl__domain_suspend_state *dss); +_hidden void libxl__domain_save(libxl__egc *egc, + libxl__domain_suspend_state *dss); /* calls libxl__xc_domain_suspend_done when done */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |