|
|
a41c76 |
From 2069251b1f50e1aaec566909478f1443ccfe32e6 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <2069251b1f50e1aaec566909478f1443ccfe32e6@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Tue, 21 Jul 2020 13:56:22 +0200
|
|
|
a41c76 |
Subject: [PATCH] qemu: blockjob: Actually delete temporary bitmap on failed
|
|
|
a41c76 |
active commit
|
|
|
a41c76 |
|
|
|
a41c76 |
Commit 20a7abc2d2d tried to delete the possibly leftover bitmap but
|
|
|
a41c76 |
neglected to call the actual monitor to do so.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 378e4fbc795c607485799cbd060f34483f580544)
|
|
|
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: <add765f8f49b70dbfe1c2adf7e63e6e21b480c6d.1595332476.git.pkrempa@redhat.com>
|
|
|
a41c76 |
|
|
|
a41c76 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/qemu/qemu_blockjob.c | 13 +++++++++++--
|
|
|
a41c76 |
1 file changed, 11 insertions(+), 2 deletions(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
|
|
|
a41c76 |
index 7e2df1445d..486fca31f3 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_blockjob.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_blockjob.c
|
|
|
a41c76 |
@@ -1378,8 +1378,10 @@ qemuBlockJobProcessEventConcludedCopyAbort(virQEMUDriverPtr driver,
|
|
|
a41c76 |
static void
|
|
|
a41c76 |
qemuBlockJobProcessEventFailedActiveCommit(virQEMUDriverPtr driver,
|
|
|
a41c76 |
virDomainObjPtr vm,
|
|
|
a41c76 |
- qemuBlockJobDataPtr job)
|
|
|
a41c76 |
+ qemuBlockJobDataPtr job,
|
|
|
a41c76 |
+ qemuDomainAsyncJob asyncJob)
|
|
|
a41c76 |
{
|
|
|
a41c76 |
+ qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
a41c76 |
g_autoptr(virJSONValue) actions = virJSONValueNewArray();
|
|
|
a41c76 |
virDomainDiskDefPtr disk = job->disk;
|
|
|
a41c76 |
|
|
|
a41c76 |
@@ -1391,6 +1393,13 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUDriverPtr driver,
|
|
|
a41c76 |
ignore_value(qemuMonitorTransactionBitmapRemove(actions, disk->mirror->nodeformat,
|
|
|
a41c76 |
"libvirt-tmp-activewrite"));
|
|
|
a41c76 |
|
|
|
a41c76 |
+ if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0)
|
|
|
a41c76 |
+ return;
|
|
|
a41c76 |
+
|
|
|
a41c76 |
+ qemuMonitorTransaction(priv->mon, &actions);
|
|
|
a41c76 |
+
|
|
|
a41c76 |
+ if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
|
|
a41c76 |
+ return;
|
|
|
a41c76 |
|
|
|
a41c76 |
/* Ideally, we would make the backing chain read only again (yes, SELinux
|
|
|
a41c76 |
* can do that using different labels). But that is not implemented yet and
|
|
|
a41c76 |
@@ -1515,7 +1524,7 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlockJobDataPtr job,
|
|
|
a41c76 |
if (success) {
|
|
|
a41c76 |
qemuBlockJobProcessEventCompletedActiveCommit(driver, vm, job, asyncJob);
|
|
|
a41c76 |
} else {
|
|
|
a41c76 |
- qemuBlockJobProcessEventFailedActiveCommit(driver, vm, job);
|
|
|
a41c76 |
+ qemuBlockJobProcessEventFailedActiveCommit(driver, vm, job, asyncJob);
|
|
|
a41c76 |
}
|
|
|
a41c76 |
break;
|
|
|
a41c76 |
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.27.0
|
|
|
a41c76 |
|