On 6/15/20 12:09 PM, Peter Krempa wrote:
Fetch the checkpoint list for every disk specifically based on the new
per-disk 'incremental' field.

Signed-off-by: Peter Krempa <[email protected]>
---
  src/qemu/qemu_backup.c | 108 ++++++++++++++++++++---------------------
  1 file changed, 52 insertions(+), 56 deletions(-)


@@ -363,7 +407,7 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
       * pull mode:
       *   both: original disk
       */
-    if (pull || (incremental && dd->store->format >= 
VIR_STORAGE_FILE_BACKING)) {
+    if (pull || (dd->backupdisk->incremental && dd->store->format >= 
VIR_STORAGE_FILE_BACKING)) {

Long line, if you want to break at the &&.

          dd->backingStore = dd->domdisk->src;
      } else {
          dd->backingStore = dd->terminator = virStorageSourceNew();
@@ -375,7 +419,10 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
      if (qemuDomainPrepareStorageSourceBlockdev(NULL, dd->store, priv, cfg) < 
0)
          return -1;

-    if (incremental) {
+    if (dd->backupdisk->incremental) {
+        if (!(incremental = qemuBackupBeginCollectIncrementalCheckpoints(vm, 
dd->backupdisk->incremental)))

Another long line, but here it is harder to suggest a short alternative.

Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Reply via email to