From bae81b8e76929165463fcd6f0ed49e1e53c712cc Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 20 Dec 2019 09:30:28 +0100 Subject: [PATCH] qemu: block: Use proper asyncJob when waiting for completion of blockdev-create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The waiting loop used QEMU_ASYNC_JOB_NONE rather than 'asyncJob' passed from the caller. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 95a2702f9d..eab21bc107 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -2406,11 +2406,11 @@ qemuBlockStorageSourceCreateGeneric(virDomainObjPtr vm, qemuBlockJobStarted(job, vm); - qemuBlockJobUpdate(vm, job, QEMU_ASYNC_JOB_NONE); + qemuBlockJobUpdate(vm, job, asyncJob); while (qemuBlockJobIsRunning(job)) { if (virDomainObjWait(vm) < 0) goto cleanup; - qemuBlockJobUpdate(vm, job, QEMU_ASYNC_JOB_NONE); + qemuBlockJobUpdate(vm, job, asyncJob); } if (job->state == QEMU_BLOCKJOB_STATE_FAILED || -- GitLab