From nobody Fri Dec 19 16:07:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1619014273; cv=none; d=zohomail.com; s=zohoarc; b=YFAI7vNR1rF+RTn9qA1mTaW1JPe311eYXK4T9kWPj6dYE3hMiDnM5E/qSScizY/SGpZfUk90jo03dM/ZqqeOGAVrn1KXqg5H6X9G6ECc83Da6Ly7Mfn8FE2/Boo8CJr0g4LxZYww+YRcxG6HfzJyadt0qSETAxa94vgHWV7h1IU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619014273; 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; bh=QSN5p6FtThauCSNBOz8IxMtVaYc1JYcRmP8zE0W0Ehc=; b=PdNOqQ/aOyZSpUzcQalIc9HyoMD12huyjCyq72ULt6oEEPvVCi1yJ7Pz0pb4vmGugTH/ofOOYca3NoQkBdFwu2FTFQSQhMU4MnNfGP4sTpZ7YtZm0P+9zpTcUVvkRxYe8SYfnRQmX9f9MJwju0yndV2fkIgX8VokIzvjC3zIrCc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1619014273070667.9869971761916; Wed, 21 Apr 2021 07:11:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-379-hESq6HAQOIO3TQhFEp90PA-1; Wed, 21 Apr 2021 10:06:08 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92444839A46; Wed, 21 Apr 2021 14:04:59 +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 45A286085A; Wed, 21 Apr 2021 14:04:59 +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 06E0144A5C; Wed, 21 Apr 2021 14:04:59 +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 13LE4n8l023983 for ; Wed, 21 Apr 2021 10:04:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id E260D6085A; Wed, 21 Apr 2021 14:04:49 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47E546091B for ; Wed, 21 Apr 2021 14:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013972; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=QSN5p6FtThauCSNBOz8IxMtVaYc1JYcRmP8zE0W0Ehc=; b=fKISF/pP90fK2m6+43/05Am6t0nyobdc9VZ1xqp/3zsK3tAgqPoL/Xeq8KaTFjP+Mi+aUJ Cmctq+ANQSYx8dE52v9g5wnfQJ4h4ZwTLwmePaqUH969KCM2m5gijDxSIwXWfh6kO1c5Os N2Xm3c1IRpYaeSmlHtnsxw/eB/GElJw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619014272; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=QSN5p6FtThauCSNBOz8IxMtVaYc1JYcRmP8zE0W0Ehc=; b=DbMyxiBnkTms/TJHGLSxenKM/DRiiNjHcq7MdiwHIn2y8iya9+4eKkBO7/nR4lbaMYZC7h KPcrhfmkg4mUtsPKYr/Su9V92E7fne+lw32JMDb8Decyj9Q57i+AOwp8bmT1XAi85Ga4bL kyJf2RTEfao7GmKRTEIuFFO+ivUjrck= X-MC-Unique: hESq6HAQOIO3TQhFEp90PA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/10] qemuDomainBlockJobAbort: Don't use 'job-cancel' instead of 'block-job-cancel' Date: Wed, 21 Apr 2021 16:04:34 +0200 Message-Id: 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 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 'block-job-cancel' has one very important semantic difference to 'job-cancel', docummented in qemu as: Note that if you issue 'block-job-cancel' after 'drive-mirror' has indica= ted (via the event BLOCK_JOB_READY) that the source and destination are synchronized, then the event triggered by this command changes to BLOCK_JOB_COMPLETED, to indicate that the mirroring has ended and the destination now has a point-in-time copy tied to the time of the cancella= tion. Since libvirt advertises the block copy job as having the synchronous abort feature we must not use 'job-cancel' here. Fixes: 4817b5ca1d0 Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a9ad03489..c90d52edc0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14461,7 +14461,6 @@ qemuDomainBlockJobAbort(virDomainPtr dom, g_autoptr(qemuBlockJobData) job =3D NULL; virDomainObj *vm; qemuDomainObjPrivate *priv =3D NULL; - bool blockdev =3D false; int ret =3D -1; virCheckFlags(VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC | @@ -14489,7 +14488,6 @@ qemuDomainBlockJobAbort(virDomainPtr dom, } priv =3D vm->privateData; - blockdev =3D virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); if (job->state =3D=3D QEMU_BLOCKJOB_STATE_ABORTING || job->state =3D=3D QEMU_BLOCKJOB_STATE_PIVOTING) { @@ -14507,10 +14505,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, goto endjob; } else { qemuDomainObjEnterMonitor(driver, vm); - if (blockdev) - ret =3D qemuMonitorJobCancel(priv->mon, job->name, false); - else - ret =3D qemuMonitorBlockJobCancel(priv->mon, job->name, false); + ret =3D qemuMonitorBlockJobCancel(priv->mon, job->name, false); if (qemuDomainObjExitMonitor(driver, vm) < 0) { ret =3D -1; goto endjob; --=20 2.30.2