From: Claudio Fontana <cfontana@suse.de>
Add a new VIR_DOMAIN_SAVE_PARALLEL flag to the save and restore APIs,
which can be used to specify the use of multiple, parallel channels
for saving and restoring a domain. The number of parallel channels
can be set using the VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS
typed parameter.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
include/libvirt/libvirt-domain.h | 11 +++++++++++
src/libvirt-domain.c | 3 +++
2 files changed, 14 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 0121620e9c..7f1a2003c0 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1655,6 +1655,7 @@ typedef enum {
VIR_DOMAIN_SAVE_RUNNING = 1 << 1, /* Favor running over paused (Since: 0.9.5) */
VIR_DOMAIN_SAVE_PAUSED = 1 << 2, /* Favor paused over running (Since: 0.9.5) */
VIR_DOMAIN_SAVE_RESET_NVRAM = 1 << 3, /* Re-initialize NVRAM from template (Since: 8.1.0) */
+ VIR_DOMAIN_SAVE_PARALLEL = 1 << 4, /* Save and restore using parallel channels (Since: 10.6.0) */
} virDomainSaveRestoreFlags;
int virDomainSave (virDomainPtr domain,
@@ -1712,6 +1713,16 @@ int virDomainRestoreParams (virConnectPtr conn,
*/
# define VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT "image_format"
+/*
+ * VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS:
+ *
+ * an optional parameter used to specify the number of IO channels to use
+ * during parallel save. As VIR_TYPED_PARAM_INT.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS "parallel.channels"
+
/* See below for virDomainSaveImageXMLFlags */
char * virDomainSaveImageGetXMLDesc (virConnectPtr conn,
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 0ee7c6f45b..d0c1b6c037 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -1225,6 +1225,9 @@ virDomainRestoreFlags(virConnectPtr conn, const char *from, const char *dxml,
* now, VIR_DOMAIN_SAVE_PARAM_FILE is required but this requirement may
* be lifted in the future.
*
+ * See VIR_DOMAIN_SAVE_PARAM_* for detailed description of accepted
+ * restore parameters.
+ *
* Returns 0 in case of success and -1 in case of failure.
*
* Since: 8.4.0
--
2.43.0