From nobody Mon Feb 9 07:38:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1563467520; cv=none; d=zoho.com; s=zohoarc; b=FRuQKYyBnbpEqnEwgx98IZQSckGxI6nbyVsnoGu6RTM3oqA0o0Hmc8ydEelbZ1VaZrFNxpfg+OzP9Po1c08n/lH1VLUJgEtGd4updZ9519A9MaRWH9DHfqrhqtmiq99dCBYHJ0hjaiQ7Y/ms4ifpJsYiweASwqvZtoB3zcVrCjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563467520; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ALN48KqG6SQPmDBQGiCnmZFKO8mte9rxn8yg1Q4tnbo=; b=e/efggJLuXFxlNaoSDe/4qbYM6d5GbquaJ+ITMVyWYqN27yhmaE5h1R3jx29rMfYKfZUrDcdfl37QLCdxqUoEVTV6dyb8LY+0KET7MZBdIR0FqS1f2n/Bx5rn8DH2EY3g/on4D4XqM2rL7FaM6NbsB6eU/WYD3sTl2Yho9YbzOU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563467520525577.3853893236255; Thu, 18 Jul 2019 09:32:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4E3A5D674; Thu, 18 Jul 2019 16:31:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBF6C5C22F; Thu, 18 Jul 2019 16:31:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 781464EA31; Thu, 18 Jul 2019 16:31:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6IGVo19005193 for ; Thu, 18 Jul 2019 12:31:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3F06360A35; Thu, 18 Jul 2019 16:31:50 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD477608A6 for ; Thu, 18 Jul 2019 16:31:49 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 18 Jul 2019 18:31:39 +0200 Message-Id: <2108374ad66c4d0d0647336e27d697090953d90b.1563467440.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/8] qemu: Use QEMU_BLOCKJOB_STATE_PIVOTING/ABORTING in qemuDomainBlockJobAbort X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 18 Jul 2019 16:31:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Set the correct job states after the operation is requested in qemu. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_blockjob.c | 4 +++- src/qemu/qemu_driver.c | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index fe0114bf26..0f08cf7967 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -256,7 +256,9 @@ bool qemuBlockJobIsRunning(qemuBlockJobDataPtr job) { return job->state =3D=3D QEMU_BLOCKJOB_STATE_RUNNING || - job->state =3D=3D QEMU_BLOCKJOB_STATE_READY; + job->state =3D=3D QEMU_BLOCKJOB_STATE_READY || + job->state =3D=3D QEMU_BLOCKJOB_STATE_ABORTING || + job->state =3D=3D QEMU_BLOCKJOB_STATE_PIVOTING; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fa9e3c2bfc..39b5ea5e7e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17028,6 +17028,7 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver, if (disk && disk->mirror) disk->mirrorState =3D VIR_DOMAIN_DISK_MIRROR_STATE_PIVOT; + job->state =3D QEMU_BLOCKJOB_STATE_PIVOTING; cleanup: return ret; @@ -17182,10 +17183,10 @@ qemuDomainBlockJobAbort(virDomainPtr dom, goto endjob; } - if (disk->mirrorState !=3D VIR_DOMAIN_DISK_MIRROR_STATE_NONE && - disk->mirrorState !=3D VIR_DOMAIN_DISK_MIRROR_STATE_READY) { + if (job->state =3D=3D QEMU_BLOCKJOB_STATE_ABORTING || + job->state =3D=3D QEMU_BLOCKJOB_STATE_PIVOTING) { virReportError(VIR_ERR_OPERATION_INVALID, - _("another job on disk '%s' is still being ended"), + _("block job on disk '%s' is still being ended"), disk->dst); goto endjob; } @@ -17209,6 +17210,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, if (disk->mirror) disk->mirrorState =3D VIR_DOMAIN_DISK_MIRROR_STATE_ABORT; + job->state =3D QEMU_BLOCKJOB_STATE_ABORTING; } ignore_value(virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, dr= iver->caps)); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list