render / rpms / libvirt

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