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