[PATCH 03/11] qemu: backup: Configure backup store image with backing file

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

 



In contrast to snapshots the backup job does not complain when the
backup job's store file has backing pre-configured. It's actually
required so that the NBD server exposes all the data properly.

Remove our fake termination and use the existing disk source as backing.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_backup.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 294d5999a0..de4730441b 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -302,7 +302,6 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
                              bool removeStore)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    g_autoptr(virStorageSource) terminator = NULL;

     /* set data structure */
     dd->backupdisk = backupdisk;
@@ -331,17 +330,14 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
             return -1;
     }

-    /* install terminator to prevent qemu form opening backing images */
-    if (!(terminator = virStorageSourceNew()))
-        return -1;
-
     if (!(dd->blockjob = qemuBlockJobDiskNewBackup(vm, dd->domdisk, dd->store,
                                                    removeStore,
                                                    dd->incrementalBitmap)))
         return -1;

+    /* use original disk as backing to prevent opening the backing chain */
     if (!(dd->crdata = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(dd->store,
-                                                                           terminator,
+                                                                           dd->domdisk->src,
                                                                            priv->qemuCaps)))
         return -1;

-- 
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