From nobody Fri Dec 19 19:10:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1619013990; cv=none; d=zohomail.com; s=zohoarc; b=lVKTLjxD6egOE0lOQbyYSDxbeV34+SLgjAVIQ9RdQRANwdcC11DAbGVRRk1x7uDS3yfz1mQRhaUwHfMMxz2MhpHt59N9J9r73Nk/mnD8NK+kvVFarod0JkimM2OZG6bIROwMS01HQKUWpIgAnJbr7At7g/pK08L1Yks7BVEYHJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013990; 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=1zHJ0t8YrqlDvaiub8rFqptW1iqS/FBq9ZgjEKxcmBk=; b=MVQfB1JuQdiuvb1gV2+eWncffat9SyaJx1ZZAAdw+9HquV2qLEyJ4Kg/l6ElmHfCCKWraDWBuC2G+oAH0NKmLj2HZK8aynrRUMa9dcdKktnDX8tS9YkUhxFg+GQinc7Pfk2wR8phcXLklI33SIpjihz9i7RfHs2IkJRmcomnru0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619013990008485.5797831875541; Wed, 21 Apr 2021 07:06:30 -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-128-anF4uC9lP_ypP870xh2wkw-1; Wed, 21 Apr 2021 10:06:17 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A997F5B390; Wed, 21 Apr 2021 14:05:05 +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 607AF50FAF; Wed, 21 Apr 2021 14:05:05 +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 D62FB44A5B; Wed, 21 Apr 2021 14:05:04 +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 13LE4qHG024009 for ; Wed, 21 Apr 2021 10:04:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 501B46085A; Wed, 21 Apr 2021 14:04:52 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C43460CEB for ; Wed, 21 Apr 2021 14:04:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013986; 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=1zHJ0t8YrqlDvaiub8rFqptW1iqS/FBq9ZgjEKxcmBk=; b=EuTIOH6xBcsJgL8+nMj5joA5W01s6CR0CxaUt6Z50reTYyVXfBrQg94NJ5s6wSUFFXXR4w HreIyU53z/AOmPymJlKm1sYZ4/+FuNIm9w/J4lSucH09dhO6WERu6spFlPXIM5mhhqvFkP t74Z83aw2PqERt96n6eHcWrufb/R1BM= X-MC-Unique: anF4uC9lP_ypP870xh2wkw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/10] qemuBlockJobRefreshJobs: Replace qemuMonitorJobCancel by qemuMonitorBlockJobCancel Date: Wed, 21 Apr 2021 16:04:36 +0200 Message-Id: <64cc86971cbd4c56b22d8565e87f46ff366be75f.1619013793.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 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.11 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) Content-Type: text/plain; charset="utf-8" We want to unify on one block job cancellation API. Use qemuMonitorBlockJobCancel which has more features. In case of job refresh, we are killing off any unknown jobs so we don't care about their fate. Another difference is that an possible error from the block job cancellation might be reported, but we don't really care here ince it's a very unlikely scenario and we also report a warning. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 9ae4500f4d..faf9a9fb7d 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -526,7 +526,7 @@ qemuBlockJobRefreshJobs(virQEMUDriver *driver, qemuDomainObjEnterMonitor(driver, vm); - rc =3D qemuMonitorJobCancel(priv->mon, job->name, true); + rc =3D qemuMonitorBlockJobCancel(priv->mon, job->name, true); if (rc =3D=3D -1 && jobinfo[i]->status =3D=3D QEMU_MONITOR_JOB= _STATUS_CONCLUDED) VIR_WARN("can't cancel job '%s' with invalid data", job->n= ame); --=20 2.30.2