in order to enable parallel save functionality, we will need
an opportune new flag and a parameter to specify the number
of extra connections to use.
Signed-off-by: Claudio Fontana <cfontana(a)suse.de>
---
include/libvirt/libvirt-domain.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 24846046aa..766e4d116e 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1555,6 +1555,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, /* Parallel Save/Restore to multiple
files (Since: 8.4.0) */
} virDomainSaveRestoreFlags;
int virDomainSave (virDomainPtr domain,
@@ -1582,6 +1583,8 @@ int virDomainRestoreParams (virConnectPtr
conn,
* VIR_DOMAIN_SAVE_PARAM_FILE:
*
* the parameter used to specify the savestate file to save to or restore from.
+ * For parallel saves, this is the main file, with the extra connections adding suffix
+ * .1 .2 .3 ... up to VIR_DOMAIN_SAVE_PARAM_PARALLEL_CONNECTIONS.
*
* Since: 8.4.0
*/
@@ -1600,6 +1603,21 @@ int virDomainRestoreParams (virConnectPtr
conn,
*/
# define VIR_DOMAIN_SAVE_PARAM_DXML "dxml"
+/**
+ * VIR_DOMAIN_SAVE_PARAM_PARALLEL_CONNECTIONS:
+ *
+ * this optional parameter mirrors the migration parameter
+ * VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS.
+ *
+ * This parameter is used when saving state files in parallel
+ * using the flag VIR_DOMAIN_SAVE_PARALLEL.
+ * It specifies the number of extra files to save to using parallel
+ * connections.
+ *
+ * Since: 8.4.0
+ */
+# define VIR_DOMAIN_SAVE_PARAM_PARALLEL_CONNECTIONS "parallel.connections"
+
/* See below for virDomainSaveImageXMLFlags */
char * virDomainSaveImageGetXMLDesc (virConnectPtr conn,
const char *file,
--
2.35.3