|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/6] libxl_qmp: Introduce libxl__qmp_set_global_dirty_log.
Anthony PERARD writes ("[PATCH 5/6] libxl_qmp: Introduce
libxl__qmp_set_global_dirty_log."):
> This function will enable or disable the global dirty log on QEMU, used during
> a migration.
Again we have the possible concurrent use of the qmp to contend with.
Also:
> +int libxl__qmp_set_global_dirty_log(libxl__gc *gc, int domid, bool enable)
> +{
> + libxl__qmp_handler *qmp = NULL;
> + libxl__json_object *args = NULL;
> + int rc = 0;
> +
> + qmp = libxl__qmp_initialize(gc, domid);
> + if (!qmp)
> + return ERROR_FAIL;
> +
> + args = qmp_parameters_add_bool(gc, NULL, "enable", enable);
> + if (!args) {
> + rc = ERROR_NOMEM;
> + goto out;
> + }
> +
> + rc = qmp_synchronous_send(qmp, "xen-set-global-dirty-log", args,
> + NULL, NULL, qmp->timeout);
> + libxl__json_object_free(gc, args);
> +
> +out:
> + libxl__qmp_close(qmp);
> + return rc;
> +}
This pattern which is starting to appear multiple times could perhaps
be encapsulated in a function ?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |