[libvirt RFCv11 28/33] 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 c3b2afe0d8..8839e0031d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2650,7 +2650,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;
@@ -2731,7 +2732,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;
 
@@ -2809,7 +2810,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;
@@ -2848,7 +2849,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);
@@ -2922,7 +2923,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 2ed02d31de..505d9b615f 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -561,6 +561,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 158bcaff50..8542cd9081 100644
--- a/src/qemu/qemu_saveimage.h
+++ b/src/qemu/qemu_saveimage.h
@@ -130,6 +130,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 dec653c6d3..e1c18bbaff 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.26.2





[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