render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
fbe740
From 7943ddf8cee3ffa4ca2b2bfe3b440da344aebdd8 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <7943ddf8cee3ffa4ca2b2bfe3b440da344aebdd8@dist-git>
fbe740
From: Peter Krempa <pkrempa@redhat.com>
fbe740
Date: Mon, 16 Mar 2020 22:12:28 +0100
fbe740
Subject: [PATCH] qemuBlockJobDiskNewCommit: Propagate 'disabledBitmapsBase'
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
Add an argument to qemuBlockJobDiskNewCommit to propagate the list of
fbe740
disabled bitmaps into the job data structure.
fbe740
fbe740
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Reviewed-by: Eric Blake <eblake@redhat.com>
fbe740
(cherry picked from commit a2bf4a13acf55864ddb11261cbaade4aedd28b9f)
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1799013
fbe740
Message-Id: <312a928fcee253b6a2657a2f30a6a0aa6d51cae9.1584391727.git.pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 src/qemu/qemu_blockjob.c | 2 ++
fbe740
 src/qemu/qemu_blockjob.h | 1 +
fbe740
 src/qemu/qemu_driver.c   | 2 +-
fbe740
 3 files changed, 4 insertions(+), 1 deletion(-)
fbe740
fbe740
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
fbe740
index e894e1634d..63f1cc79c3 100644
fbe740
--- a/src/qemu/qemu_blockjob.c
fbe740
+++ b/src/qemu/qemu_blockjob.c
fbe740
@@ -285,6 +285,7 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm,
fbe740
                           virStorageSourcePtr topparent,
fbe740
                           virStorageSourcePtr top,
fbe740
                           virStorageSourcePtr base,
fbe740
+                          char ***disabledBitmapsBase,
fbe740
                           bool delete_imgs,
fbe740
                           unsigned int jobflags)
fbe740
 {
fbe740
@@ -310,6 +311,7 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm,
fbe740
     job->data.commit.top = top;
fbe740
     job->data.commit.base = base;
fbe740
     job->data.commit.deleteCommittedImages = delete_imgs;
fbe740
+    job->data.commit.disabledBitmapsBase = g_steal_pointer(disabledBitmapsBase);
fbe740
     job->jobflags = jobflags;
fbe740
 
fbe740
     if (qemuBlockJobRegister(job, vm, disk, true) < 0)
fbe740
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
fbe740
index c1d95ea3d8..ee83d318f3 100644
fbe740
--- a/src/qemu/qemu_blockjob.h
fbe740
+++ b/src/qemu/qemu_blockjob.h
fbe740
@@ -187,6 +187,7 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm,
fbe740
                           virStorageSourcePtr topparent,
fbe740
                           virStorageSourcePtr top,
fbe740
                           virStorageSourcePtr base,
fbe740
+                          char ***disabledBitmapsBase,
fbe740
                           bool delete_imgs,
fbe740
                           unsigned int jobflags);
fbe740
 
fbe740
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
fbe740
index 062e028b28..5c2b3cddf1 100644
fbe740
--- a/src/qemu/qemu_driver.c
fbe740
+++ b/src/qemu/qemu_driver.c
fbe740
@@ -18881,7 +18881,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
fbe740
     }
fbe740
 
fbe740
     if (!(job = qemuBlockJobDiskNewCommit(vm, disk, top_parent, topSource,
fbe740
-                                          baseSource,
fbe740
+                                          baseSource, NULL,
fbe740
                                           flags & VIR_DOMAIN_BLOCK_COMMIT_DELETE,
fbe740
                                           flags)))
fbe740
         goto endjob;
fbe740
-- 
fbe740
2.25.1
fbe740