libvirt/SOURCES/libvirt-qemuBlockJobDiskNewCommit-Propagate-disabledBitmapsBase.patch
2021-09-10 11:57:33 +00:00

73 lines
3.0 KiB
Diff

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