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

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