[PATCH 05/11] qemu: blockjob: Remove infrastructure for remembering to delete image

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

 



Now that we delete the images elsewhere it's not required. Additionally
it's safe to do as we never released an upstream version which required
this being in place.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_backup.c                         | 12 ++++--------
 src/qemu/qemu_blockjob.c                       |  2 --
 src/qemu/qemu_blockjob.h                       |  2 --
 src/qemu/qemu_domain.c                         |  7 -------
 tests/qemustatusxml2xmldata/backup-pull-in.xml |  1 -
 5 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 4ab9a2b17e..fa9588ef28 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -298,8 +298,7 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
                              virJSONValuePtr actions,
                              virDomainMomentDefPtr *incremental,
                              virHashTablePtr blockNamedNodeData,
-                             virQEMUDriverConfigPtr cfg,
-                             bool removeStore)
+                             virQEMUDriverConfigPtr cfg)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;

@@ -331,7 +330,6 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
     }

     if (!(dd->blockjob = qemuBlockJobDiskNewBackup(vm, dd->domdisk, dd->store,
-                                                   removeStore,
                                                    dd->incrementalBitmap)))
         return -1;

@@ -389,13 +387,11 @@ qemuBackupDiskPrepareData(virDomainObjPtr vm,
                           virHashTablePtr blockNamedNodeData,
                           virJSONValuePtr actions,
                           virQEMUDriverConfigPtr cfg,
-                          struct qemuBackupDiskData **rdd,
-                          bool reuse_external)
+                          struct qemuBackupDiskData **rdd)
 {
     struct qemuBackupDiskData *disks = NULL;
     ssize_t ndisks = 0;
     size_t i;
-    bool removeStore = !reuse_external && (def->type == VIR_DOMAIN_BACKUP_TYPE_PULL);

     disks = g_new0(struct qemuBackupDiskData, def->ndisks);

@@ -410,7 +406,7 @@ qemuBackupDiskPrepareData(virDomainObjPtr vm,

         if (qemuBackupDiskPrepareDataOne(vm, backupdisk, dd, actions,
                                          incremental, blockNamedNodeData,
-                                         cfg, removeStore) < 0)
+                                         cfg) < 0)
             goto error;

         if (def->type == VIR_DOMAIN_BACKUP_TYPE_PULL) {
@@ -827,7 +823,7 @@ qemuBackupBegin(virDomainObjPtr vm,
         goto endjob;

     if ((ndd = qemuBackupDiskPrepareData(vm, def, incremental, blockNamedNodeData,
-                                         actions, cfg, &dd, reuse)) <= 0) {
+                                         actions, cfg, &dd)) <= 0) {
         if (ndd == 0) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                            _("no disks selected for backup"));
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 131b53d88d..c536c19bb6 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -382,7 +382,6 @@ qemuBlockJobDataPtr
 qemuBlockJobDiskNewBackup(virDomainObjPtr vm,
                           virDomainDiskDefPtr disk,
                           virStorageSourcePtr store,
-                          bool deleteStore,
                           const char *bitmap)
 {
     g_autoptr(qemuBlockJobData) job = NULL;
@@ -395,7 +394,6 @@ qemuBlockJobDiskNewBackup(virDomainObjPtr vm,

     job->data.backup.bitmap = g_strdup(bitmap);
     job->data.backup.store = virObjectRef(store);
-    job->data.backup.deleteStore = deleteStore;

     /* backup jobs are usually started in bulk by transaction so the caller
      * shall save the status XML */
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index 42b973fe96..7d584a2980 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -113,7 +113,6 @@ typedef qemuBlockJobBackupData *qemuBlockJobDataBackupPtr;

 struct _qemuBlockJobBackupData {
     virStorageSourcePtr store;
-    bool deleteStore;
     char *bitmap;
 };

@@ -201,7 +200,6 @@ qemuBlockJobDataPtr
 qemuBlockJobDiskNewBackup(virDomainObjPtr vm,
                           virDomainDiskDefPtr disk,
                           virStorageSourcePtr store,
-                          bool deleteStore,
                           const char *bitmap);

 qemuBlockJobDataPtr
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 0e073c25e1..d76dfe3a87 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2619,9 +2619,6 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *payload,
                                                                       data->xmlopt,
                                                                       false) < 0)
                     return -1;
-
-                if (job->data.backup.deleteStore)
-                    virBufferAddLit(&childBuf, "<deleteStore/>\n");
             }
             break;

@@ -3224,10 +3221,6 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemuBlockJobDataPtr job,
             if (!(tmp = virXPathNode("./store", ctxt)) ||
                 !(job->data.backup.store = qemuDomainObjPrivateXMLParseBlockjobChain(tmp, ctxt, xmlopt)))
                 goto broken;
-
-            if (virXPathNode("./deleteStore", ctxt))
-                job->data.backup.deleteStore = true;
-
             break;

         case QEMU_BLOCKJOB_TYPE_BROKEN:
diff --git a/tests/qemustatusxml2xmldata/backup-pull-in.xml b/tests/qemustatusxml2xmldata/backup-pull-in.xml
index 6ef4965bed..3c69c41840 100644
--- a/tests/qemustatusxml2xmldata/backup-pull-in.xml
+++ b/tests/qemustatusxml2xmldata/backup-pull-in.xml
@@ -248,7 +248,6 @@
           </privateData>
         </source>
       </store>
-      <deleteStore/>
     </blockjob>
   </blockjobs>
   <agentTimeout>-2</agentTimeout>
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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