[PATCH v2 2/3] qemu: remove excessive check in qemuSnapshotCreateActiveInternal

Nikolay Shirokovskiy nikolay.shirokovskiy at openvz.org
Thu Mar 24 13:26:03 UTC 2022


After [1] it is not possible to get inactive state for domain while
communicating with QEMU (see also [2]).

Also even if it were possible the qemuProcessStopCPUs would return error
and the check would not be reached.

[1] commit 81f50cb92d16643bcd749e3ab5b404b8b7cec643
Author: Jiri Denemark <jdenemar at redhat.com>
Date:   Thu Feb 11 11:20:28 2016 +0100

    qemu: Avoid calling qemuProcessStop without a job

[2] commit f1ea5bd506b6e00aa8bf55940b147d3c0fe7f124
Author: Ján Tomko <jtomko at redhat.com>
Date:   Wed Nov 24 13:41:09 2021 +0100

    qemu: turn qemuDomainObjExitMonitor into void

Signed-off-by: Nikolay Shirokovskiy <nikolay.shirokovskiy at openvz.org>
---
 src/qemu/qemu_snapshot.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index cd94ddae24..540fda4854 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -305,11 +305,6 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
             goto cleanup;
 
         resume = true;
-        if (!virDomainObjIsActive(vm)) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("guest unexpectedly quit"));
-            goto cleanup;
-        }
     }
 
     if (qemuDomainObjEnterMonitorAsync(driver, vm,
-- 
2.35.1



More information about the libvir-list mailing list