Re: [PATCH 4/8] qemu: Use QEMU_BLOCKJOB_STATE_PIVOTING/ABORTING in qemuDomainBlockJobAbort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 18, 2019 at 18:31:39 +0200, Peter Krempa wrote:
> Set the correct job states after the operation is requested in qemu.
> 
> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> ---
>  src/qemu/qemu_blockjob.c | 4 +++-
>  src/qemu/qemu_driver.c   | 8 +++++---
>  2 files changed, 8 insertions(+), 4 deletions(-)

later in my blockdev branch I found the following hunk which is needed
to correctly transition into the cancelled state when aborting the job
which I forgot to merge into this patch:

diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 0f08cf7967..575292ada2 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -673,6 +673,10 @@ qemuBlockJobEventProcessConcluded(qemuBlockJobDataPtr job,
     if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
         goto cleanup;

+    if (job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED &&
+        job->state == QEMU_BLOCKJOB_STATE_ABORTING)
+        job->newstate = QEMU_BLOCKJOB_STATE_CANCELLED;
+
     if (refreshed)
         qemuDomainSaveStatus(vm);

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux