[libvirt RFCv10 27/32] qemu: saveimage: add parallel compression argument to ImageCreate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Claudio Fontana <cfontana@xxxxxxx>
---
 src/qemu/qemu_driver.c    | 11 ++++++-----
 src/qemu/qemu_saveimage.c |  1 +
 src/qemu/qemu_saveimage.h |  1 +
 src/qemu/qemu_snapshot.c  |  2 +-
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d1dbf8f7ab..6ea23ee187 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2641,7 +2641,8 @@ static int
 qemuDomainSaveInternal(virQEMUDriver *driver,
                        virDomainObj *vm, const char *path,
                        int compressed, virCommand *compressor,
-                       const char *xmlin, int nconn, unsigned int flags)
+                       const char *xmlin, int nconn, const char *pcomp,
+                       unsigned int flags)
 {
     g_autofree char *xml = NULL;
     bool was_running = false;
@@ -2722,7 +2723,7 @@ qemuDomainSaveInternal(virQEMUDriver *driver,
     xml = NULL;
 
     ret = qemuSaveImageCreate(driver, vm, path, data, compressor,
-                              nconn, flags, VIR_ASYNC_JOB_SAVE);
+                              nconn, pcomp, flags, VIR_ASYNC_JOB_SAVE);
     if (ret < 0)
         goto endjob;
 
@@ -2800,7 +2801,7 @@ qemuDomainManagedSaveHelper(virQEMUDriver *driver,
     VIR_INFO("Saving state of domain '%s' to '%s'", vm->def->name, path);
 
     if (qemuDomainSaveInternal(driver, vm, path, compressed,
-                               compressor, dxml, -1, flags) < 0)
+                               compressor, dxml, -1, NULL, flags) < 0)
         return -1;
 
     vm->hasManagedSave = true;
@@ -2839,7 +2840,7 @@ qemuDomainSaveFlags(virDomainPtr dom, const char *path, const char *dxml,
         goto cleanup;
 
     ret = qemuDomainSaveInternal(driver, vm, path, compressed,
-                                 compressor, dxml, -1, flags);
+                                 compressor, dxml, -1, NULL, flags);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -2913,7 +2914,7 @@ qemuDomainSaveParams(virDomainPtr dom,
         goto cleanup;
 
     ret = qemuDomainSaveInternal(driver, vm, to, compressed,
-                                 compressor, dxml, nconn, flags);
+                                 compressor, dxml, nconn, NULL, flags);
 
  cleanup:
     virDomainObjEndAPI(&vm);
diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index 022d57a3d4..2381e0fb74 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -640,6 +640,7 @@ qemuSaveImageCreate(virQEMUDriver *driver,
                     virQEMUSaveData *data,
                     virCommand *compressor,
                     int nconn,
+                    const char *pcomp G_GNUC_UNUSED,
                     unsigned int flags,
                     virDomainAsyncJob asyncJob)
 {
diff --git a/src/qemu/qemu_saveimage.h b/src/qemu/qemu_saveimage.h
index 575ea71da9..71f1832fb0 100644
--- a/src/qemu/qemu_saveimage.h
+++ b/src/qemu/qemu_saveimage.h
@@ -132,6 +132,7 @@ qemuSaveImageCreate(virQEMUDriver *driver,
                     virQEMUSaveData *data,
                     virCommand *compressor,
                     int nconn,
+                    const char *pcomp,
                     unsigned int flags,
                     virDomainAsyncJob asyncJob);
 
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 626a5a14b9..daa72983b3 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -1457,7 +1457,7 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
         memory_existing = virFileExists(snapdef->memorysnapshotfile);
 
         if ((ret = qemuSaveImageCreate(driver, vm, snapdef->memorysnapshotfile,
-                                       data, compressor, -1, 0,
+                                       data, compressor, -1, NULL, 0,
                                        VIR_ASYNC_JOB_SNAPSHOT)) < 0)
             goto cleanup;
 
-- 
2.35.3





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux