render / rpms / libvirt

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