#ifndef LIBXL_COLO_H
#define LIBXL_COLO_H
+#include "libxl_internal.h"
#include <linux/netlink.h>
-struct libxl__ao;
-struct libxl__egc;
-struct libxl__colo_save_state;
-struct libxl__checkpoint_devices_state;
-
/* Consistent with the new COLO netlink channel in kernel side */
#define NETLINK_COLO 28
COLO_PROXY_RESET, /* UNUSED, will be used for continuous FT */
};
-typedef struct libxl__colo_device_nic {
+struct libxl__colo_device_nic {
int devid;
const char *vif;
-} libxl__colo_device_nic;
+};
-typedef struct libxl__colo_qdisk {
+struct libxl__colo_qdisk {
bool setuped;
-} libxl__colo_qdisk;
+};
-typedef struct libxl__colo_proxy_state libxl__colo_proxy_state;
struct libxl__colo_proxy_state {
/* set by caller of colo_proxy_setup */
struct libxl__ao *ao;
int index;
};
-typedef struct libxl__domain_create_state libxl__domain_create_state;
-typedef void libxl__domain_create_cb(struct libxl__egc *egc,
- libxl__domain_create_state *dcs,
- int rc, uint32_t domid);
+struct libxl__colo_save_state {
+ int send_fd;
+ int recv_fd;
+ char *colo_proxy_script;
+
+ /* private */
+ libxl__stream_read_state srs;
+ void (*callback)(libxl__egc *, libxl__colo_save_state *, int);
+ bool svm_running;
+ bool paused;
+
+ /* private, used by qdisk block replication */
+ bool qdisk_used;
+ bool qdisk_setuped;
+
+ /* private, used by colo-proxy */
+ libxl__colo_proxy_state cps;
+ libxl__ev_child child;
+};
+
-typedef struct libxl__colo_restore_state libxl__colo_restore_state;
typedef void libxl__colo_callback(struct libxl__egc *egc,
libxl__colo_restore_state *crs, int rc);
#include "_libxl_types_internal.h"
#include "_libxl_types_internal_json.h"
-#include "libxl_colo.h"
-
#define LIBXL_INIT_TIMEOUT 10
#define LIBXL_DESTROY_TIMEOUT 10
#define LIBXL_HOTPLUG_TIMEOUT 40
typedef struct libxl__osevent_hook_nexus libxl__osevent_hook_nexus;
typedef struct libxl__osevent_hook_nexi libxl__osevent_hook_nexi;
+typedef struct libxl__domain_create_state libxl__domain_create_state;
+typedef void libxl__domain_create_cb(struct libxl__egc *egc,
+ libxl__domain_create_state *dcs,
+ int rc, uint32_t domid);
+
+typedef struct libxl__colo_device_nic libxl__colo_device_nic;
+typedef struct libxl__colo_qdisk libxl__colo_qdisk;
+typedef struct libxl__colo_proxy_state libxl__colo_proxy_state;
+typedef struct libxl__colo_save_state libxl__colo_save_state;
+typedef struct libxl__colo_restore_state libxl__colo_restore_state;
+
_hidden void libxl__alloc_failed(libxl_ctx *, const char *func,
size_t nmemb, size_t size) __attribute__((noreturn));
/* func, size and nmemb are used only in the log message.
return stream->running;
}
+#include "libxl_colo.h"
/*----- Domain suspend (save) state structure -----*/
/*
return stream->running;
}
-/*----- colo related state structure -----*/
-typedef struct libxl__colo_save_state libxl__colo_save_state;
-struct libxl__colo_save_state {
- int send_fd;
- int recv_fd;
- char *colo_proxy_script;
-
- /* private */
- libxl__stream_read_state srs;
- void (*callback)(libxl__egc *, libxl__colo_save_state *, int);
- bool svm_running;
- bool paused;
-
- /* private, used by qdisk block replication */
- bool qdisk_used;
- bool qdisk_setuped;
-
- /* private, used by colo-proxy */
- libxl__colo_proxy_state cps;
- libxl__ev_child child;
-};
-
typedef struct libxl__logdirty_switch {
/* Set by caller of libxl__domain_common_switch_qemu_logdirty */
libxl__ao *ao;