[RFC PATCH 18/41] qemu: snapshot: Don't propagate bitmaps to upper layers

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

 



With the upcoming changes to use 'dirty-bitmap-populate' job, this will
no longer be required to do the backups, so we can stop creating bitmaps
which would be pointless.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 88517ba6a7..5a3b3bb35b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15016,44 +15016,6 @@ qemuDomainSnapshotDiskCleanup(qemuDomainSnapshotDiskDataPtr data,
 }


-/**
- * qemuDomainSnapshotDiskBitmapsPropagate:
- *
- * This function propagates any active persistent bitmap present in the original
- * image into the new snapshot. This is necessary to keep tracking the changed
- * blocks in the active bitmaps as the backing file will become read-only.
- * We leave the original bitmap active as in cases when the overlay is
- * discarded (snapshot revert with abandoning the history) everything works as
- * expected.
- */
-static int
-qemuDomainSnapshotDiskBitmapsPropagate(qemuDomainSnapshotDiskDataPtr dd,
-                                       virJSONValuePtr actions,
-                                       virHashTablePtr blockNamedNodeData)
-{
-    qemuBlockNamedNodeDataPtr entry;
-    size_t i;
-
-    if (!(entry = virHashLookup(blockNamedNodeData, dd->disk->src->nodeformat)))
-        return 0;
-
-    for (i = 0; i < entry->nbitmaps; i++) {
-        qemuBlockNamedNodeDataBitmapPtr bitmap = entry->bitmaps[i];
-
-        /* we don't care about temporary, inconsistent, or disabled bitmaps */
-        if (!bitmap->persistent || !bitmap->recording || bitmap->inconsistent)
-            continue;
-
-        if (qemuMonitorTransactionBitmapAdd(actions, dd->src->nodeformat,
-                                            bitmap->name, true, false,
-                                            bitmap->granularity) < 0)
-            return -1;
-    }
-
-    return 0;
-}
-
-
 static int
 qemuDomainSnapshotDiskPrepareOneBlockdev(virQEMUDriverPtr driver,
                                          virDomainObjPtr vm,
@@ -15200,9 +15162,6 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
                                                      blockNamedNodeData, asyncJob) < 0)
             return -1;

-        if (qemuDomainSnapshotDiskBitmapsPropagate(dd, actions, blockNamedNodeData) < 0)
-            return -1;
-
         if (qemuBlockSnapshotAddBlockdev(actions, dd->disk, dd->src) < 0)
             return -1;
     } else {
-- 
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