Blame SOURCES/libvirt-qemuBackupBegin-Fix-monitor-access-when-rolling-back-due-to-failure.patch

a41c76
From 54b47c1f5bf860e2fadeb17a954a109aafd62067 Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <54b47c1f5bf860e2fadeb17a954a109aafd62067@dist-git>
a41c76
From: Peter Krempa <pkrempa@redhat.com>
a41c76
Date: Thu, 26 Mar 2020 18:25:12 +0100
a41c76
Subject: [PATCH] qemuBackupBegin: Fix monitor access when rolling back due to
a41c76
 failure
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
The code attempting to clean up after a failed pull mode backup job
a41c76
wrongly entered monitor but didn't clean up nor exit monitor due to a
a41c76
logic bug. Fix the condition.
a41c76
a41c76
Introduced in a1521f84a53
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1817327
a41c76
a41c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
a41c76
Reviewed-by: Eric Blake <eblake@redhat.com>
a41c76
(cherry picked from commit e060b0624d1b78438b759cc5a25da87b28c9736c)
a41c76
Message-Id: <95ad49e5316e5f9dd992e463bc7536e3046140d4.1585243469.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_backup.c | 2 +-
a41c76
 1 file changed, 1 insertion(+), 1 deletion(-)
a41c76
a41c76
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
a41c76
index 8b66ee8d1f..9a056fa407 100644
a41c76
--- a/src/qemu/qemu_backup.c
a41c76
+++ b/src/qemu/qemu_backup.c
a41c76
@@ -894,7 +894,7 @@ qemuBackupBegin(virDomainObjPtr vm,
a41c76
     qemuCheckpointRollbackMetadata(vm, chk);
a41c76
 
a41c76
     if (!job_started && nbd_running &&
a41c76
-        qemuDomainObjEnterMonitorAsync(priv->driver, vm, QEMU_ASYNC_JOB_BACKUP) < 0) {
a41c76
+        qemuDomainObjEnterMonitorAsync(priv->driver, vm, QEMU_ASYNC_JOB_BACKUP) == 0) {
a41c76
         ignore_value(qemuMonitorNBDServerStop(priv->mon));
a41c76
         ignore_value(qemuDomainObjExitMonitor(priv->driver, vm));
a41c76
     }
a41c76
-- 
a41c76
2.26.0
a41c76