|
|
a41c76 |
From 3c9641730c62ffae735d7984b3bc0632a9194b03 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <3c9641730c62ffae735d7984b3bc0632a9194b03@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Tue, 21 Jul 2020 13:56:21 +0200
|
|
|
a41c76 |
Subject: [PATCH] qemu: blockjob: Don't base bitmap handling of active-layer
|
|
|
a41c76 |
block commit on QEMU_CAPS_BLOCKDEV_REOPEN
|
|
|
a41c76 |
|
|
|
a41c76 |
The handler finalizing the active layer block commit doesn't actually
|
|
|
a41c76 |
reopen the file for active layer block commit, so the comment and check
|
|
|
a41c76 |
are invalid.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit d73f107469c8882a47ffbf1a55bd0b0370d6969e)
|
|
|
a41c76 |
|
|
|
a41c76 |
rhel-8.3: https://bugzilla.redhat.com/show_bug.cgi?id=1857779
|
|
|
a41c76 |
rhel-av-8.2.1: not cloned yet
|
|
|
a41c76 |
Message-Id: <6946fb2535038e24dcef4884806c11c258f0fc70.1595332476.git.pkrempa@redhat.com>
|
|
|
a41c76 |
|
|
|
a41c76 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/qemu/qemu_blockjob.c | 3 ++-
|
|
|
a41c76 |
src/qemu/qemu_driver.c | 6 +-----
|
|
|
a41c76 |
2 files changed, 3 insertions(+), 6 deletions(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
|
|
|
a41c76 |
index 6e33f8666c..7e2df1445d 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_blockjob.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_blockjob.c
|
|
|
a41c76 |
@@ -1063,7 +1063,8 @@ qemuBlockJobProcessEventCompletedCommitBitmaps(virDomainObjPtr vm,
|
|
|
a41c76 |
g_autoptr(virJSONValue) actions = NULL;
|
|
|
a41c76 |
bool active = job->type == QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT;
|
|
|
a41c76 |
|
|
|
a41c76 |
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
|
|
|
a41c76 |
+ if (!active &&
|
|
|
a41c76 |
+ !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
|
|
|
a41c76 |
return 0;
|
|
|
a41c76 |
|
|
|
a41c76 |
if (!(blockNamedNodeData = qemuBlockGetNamedNodeData(vm, asyncJob)))
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
a41c76 |
index 9e3a455814..ad5ef7d67d 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_driver.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_driver.c
|
|
|
a41c76 |
@@ -17631,11 +17631,7 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver,
|
|
|
a41c76 |
break;
|
|
|
a41c76 |
|
|
|
a41c76 |
case QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT:
|
|
|
a41c76 |
- /* we technically don't need reopen here, but we couldn't prepare
|
|
|
a41c76 |
- * the bitmaps if it wasn't present thus must skip this */
|
|
|
a41c76 |
- if (blockdev &&
|
|
|
a41c76 |
- virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) {
|
|
|
a41c76 |
-
|
|
|
a41c76 |
+ if (blockdev) {
|
|
|
a41c76 |
actions = virJSONValueNewArray();
|
|
|
a41c76 |
|
|
|
a41c76 |
if (qemuMonitorTransactionBitmapAdd(actions,
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.27.0
|
|
|
a41c76 |
|