From nobody Sun May 19 12:26:34 2024 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=1619013965; cv=none; d=zohomail.com; s=zohoarc; b=O9FQiys2a+KZjnnTlQkDpo7AdFL2bOjF4JEjGU/75f42oMgn9f7WI1Mpd7B6ycbo2KQZJFMtrndLs2iStvo7Pa0onJW8EFStA0kR4a3IrfORnLi81vcM27+dKHIE9HaqTx0y2ciDy2FFnvgt+0LgtVattnYj2Qj7ygjd4UoITAU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013965; 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=ukdxvMZ6qNuwg65JNnOInojzEv+NFcKBGmBgplv8v4Y=; b=SvM7Zm6UdGKz9SLOT9hnblEf2r5zJqrQ18qc2DPPiYeIn9CiZUJGSSdVhfgSRSJbXy1j4aG9ZRVnrODA3PdgqAmq4uj4UDgJT5sPS5ggjeeDzj1bgDO117QneLIJAkqitFRtuQ5ORjS6FTp7JWY0FgjyIxcGalLMwd4HeD0jpiw= 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 1619013965709823.9944990770289; Wed, 21 Apr 2021 07:06:05 -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-282-_uKS05xkNW66-mrUZf98ag-1; Wed, 21 Apr 2021 10:06:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62D1780D69E; Wed, 21 Apr 2021 14:04:55 +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 40C25610A8; Wed, 21 Apr 2021 14:04:55 +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 DCEB244A5B; Wed, 21 Apr 2021 14:04:54 +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 13LE4kHC023954 for ; Wed, 21 Apr 2021 10:04:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F94F6091B; Wed, 21 Apr 2021 14:04:46 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A4E56085A for ; Wed, 21 Apr 2021 14:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013963; 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=ukdxvMZ6qNuwg65JNnOInojzEv+NFcKBGmBgplv8v4Y=; b=Y1t1npAES59lHh2ACw8B+fcGNmCkhM0jUk0rOCbRtvJ88pOCrU29ecc9XHskS0BZ52Std4 SXXMypJDmZ4rVP7idCgMYJCLdE6/gfeyO8hEbGI0DA3akE4dObwclta2F2o1DwdWKZBJOl 0AeJYK7L4D48Bfp+VHKE16IVXVsdgH0= X-MC-Unique: _uKS05xkNW66-mrUZf98ag-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/10] qemumonitorjsontest: Add test for 'qemuMonitorJSONBlockJobCancel' Date: Wed, 21 Apr 2021 16:04:31 +0200 Message-Id: <38b246655fa340c234c5bb96431ff00f199cc152.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.12 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" Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 0866ebe2bf..8ed6509159 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1218,6 +1218,7 @@ GEN_TEST_FUNC(qemuMonitorJSONBitmapRemove, "foodev", = "newnode") GEN_TEST_FUNC(qemuMonitorJSONJobDismiss, "jobname") GEN_TEST_FUNC(qemuMonitorJSONJobCancel, "jobname", false) GEN_TEST_FUNC(qemuMonitorJSONJobComplete, "jobname") +GEN_TEST_FUNC(qemuMonitorJSONBlockJobCancel, "jobname") static int testQemuMonitorJSONqemuMonitorJSONNBDServerStart(const void *opaque) @@ -3122,6 +3123,7 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONJobDismiss); DO_TEST_GEN(qemuMonitorJSONJobCancel); DO_TEST_GEN(qemuMonitorJSONJobComplete); + DO_TEST_GEN(qemuMonitorJSONBlockJobCancel); DO_TEST(qemuMonitorJSONGetBalloonInfo); DO_TEST(qemuMonitorJSONGetBlockInfo); DO_TEST(qemuMonitorJSONGetAllBlockStatsInfo); --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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=1619013960; cv=none; d=zohomail.com; s=zohoarc; b=cpIVKuFUrb2YYRubC7FnoiQPuzXn8oRZU1BF0YmTrwz7GTh4xdbDNVEC19RpjbJTQL2fBLgbnkNw0+ptj1ht8pFfp1alyVt/Tx1AUS1JAMuiJVShHYWYlLy4rE7jTqb6L13FVN29fwZT8dS9dtX30BUrD+3hrbQUr8bD60SyQpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013960; 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=O5kU42nhopgopepEZmohv8exgvuqEubtFbiCEfJgtJw=; b=iYI8Ljxh+OLYJhaEP/sKV6Do4iCqiCe1FSz3jKABqPcUD6TvcM4nATMHS1c9qTGCHvdHxqZ4UVikNM5PX+dtHsZ9yERM0XQLlo/IfeRW8rp6Qt+UhuVbCgxji1dep+1QroOs+jkabpLEIbppR4uTCV4a/wfLV8J6mUIjFKvFYCs= 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 1619013960026103.24049632842434; Wed, 21 Apr 2021 07:06:00 -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-324-6y-axJn-NrSdaEmaXARGJQ-1; Wed, 21 Apr 2021 10:05:53 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D8303100807C; Wed, 21 Apr 2021 14:04:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A584718E59; Wed, 21 Apr 2021 14:04: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 618DE1806D1B; Wed, 21 Apr 2021 14:04: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 13LE4liJ023965 for ; Wed, 21 Apr 2021 10:04:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id A70D660938; Wed, 21 Apr 2021 14:04:47 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40D116091B for ; Wed, 21 Apr 2021 14:04:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013958; 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=O5kU42nhopgopepEZmohv8exgvuqEubtFbiCEfJgtJw=; b=LCXy7No/GPoegECLG/Imn1++nSioM4lYwLQqw01N+loZvFNgupsr6ISd6UZg/phzmNMFRs XpLEbu85DeHu6BztuYm7NDZAiHaSvr8C2oRTtckqx7dvLdXQUwcOMBUxutt2eR9ExNjHCb 6tTa5jolEHDu/aBLeEHUCJ/wsUrYacs= X-MC-Unique: 6y-axJn-NrSdaEmaXARGJQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 02/10] qemuMonitorJSONBlockJobCancel: Refactor cleanup Date: Wed, 21 Apr 2021 16:04:32 +0200 Message-Id: <62a0f1993b3c85f4d0814b34e707414591cba9c0.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.84 on 10.5.11.23 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" Use automatic memory freeing and remove the cleanup section. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 652034472a..8f3ccb0c63 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5219,9 +5219,8 @@ int qemuMonitorJSONBlockJobCancel(qemuMonitor *mon, const char *jobname) { - int ret =3D -1; - virJSONValue *cmd =3D NULL; - virJSONValue *reply =3D NULL; + g_autoptr(virJSONValue) cmd =3D NULL; + g_autoptr(virJSONValue) reply =3D NULL; if (!(cmd =3D qemuMonitorJSONMakeCommand("block-job-cancel", "s:device", jobname, @@ -5229,17 +5228,12 @@ qemuMonitorJSONBlockJobCancel(qemuMonitor *mon, return -1; if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - goto cleanup; + return -1; if (qemuMonitorJSONBlockJobError(cmd, reply, jobname) < 0) - goto cleanup; - - ret =3D 0; + return -1; - cleanup: - virJSONValueFree(cmd); - virJSONValueFree(reply); - return ret; + return 0; } --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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=1619013959; cv=none; d=zohomail.com; s=zohoarc; b=bCxbo8osoa/N5nM0c8ylx6c+9BJ32HEqWiFES8QGsZ6a7v0PLOZdWp+BffaywnJ7vW8eRl+ul4VmVUrud+zLuknwg875ItLLy4kyMLDGndtYfrjOidikQG3C3zOXv9V72AizvMtALCwX2cbR+uJY2V5+eAiFSASEyUoWot08EQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013959; 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=agLZvObWYPhzFq1jozzUEOCVTtlPH9BG39rfEpJzyHw=; b=oDWacSBNqqaKGOra20ICJ0zI/4LamI9VacUTDCjakSUTsRupXTv8LAjA8LEAGuI/QV3p8PoJFRMNUI1u5wG4lI+fP36uGesUDSrxg50Cb4nrbVOyOu2+EGU97uzujnhyfcoaPp8jQM8/vzCIYzDEDHobptEth9ihaet3pjUYtRs= 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 1619013959305409.33473631478614; Wed, 21 Apr 2021 07:05:59 -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-179-XzVzh5cxMA6uBZpTVplpFQ-1; Wed, 21 Apr 2021 10:05:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B211100A637; Wed, 21 Apr 2021 14:04:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65FA360C5F; Wed, 21 Apr 2021 14:04:56 +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 F32631806D1A; Wed, 21 Apr 2021 14:04:55 +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 13LE4mBP023976 for ; Wed, 21 Apr 2021 10:04:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id C428A6091B; Wed, 21 Apr 2021 14:04:48 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DA7B6085A for ; Wed, 21 Apr 2021 14:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013957; 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=agLZvObWYPhzFq1jozzUEOCVTtlPH9BG39rfEpJzyHw=; b=FSDxftYlyW6xg9NX2gduvnt5iZXER4qWdzx/UawCHyctZNrGSYXIbmNcJiObvk1J6hL5Lf xR+W0L5KyURG9En0ioho/38SNQXBhZExn8geVTQ8diznpVUOd4xrlX1nIFKELVsG0a3D0b +ZQ9cXBZnZaI39t3TCMMaVRHvM5oDac= X-MC-Unique: XzVzh5cxMA6uBZpTVplpFQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/10] qemu: monitor: Add 'force' argument for 'block-job-cancel' QMP command Date: Wed, 21 Apr 2021 16:04:33 +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.12 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" In certain cases such as when aborting migration we don't really care for completion of the blockjob. Add 'force' as parameter of 'block-job-cancel'. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_monitor.c | 7 ++++--- src/qemu/qemu_monitor.h | 3 ++- src/qemu/qemu_monitor_json.c | 4 +++- src/qemu/qemu_monitor_json.h | 3 ++- tests/qemumonitorjsontest.c | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d908e95ba7..7a9ad03489 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14510,7 +14510,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, if (blockdev) ret =3D qemuMonitorJobCancel(priv->mon, job->name, false); else - ret =3D qemuMonitorBlockJobCancel(priv->mon, job->name); + ret =3D qemuMonitorBlockJobCancel(priv->mon, job->name, false); if (qemuDomainObjExitMonitor(driver, vm) < 0) { ret =3D -1; goto endjob; diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index df88f954ed..b9143166cb 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -732,7 +732,7 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver, if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) return -1; - rv =3D qemuMonitorBlockJobCancel(priv->mon, job->name); + rv =3D qemuMonitorBlockJobCancel(priv->mon, job->name, false); if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0) return -1; diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f3f14c46b6..fa8a027aa6 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3403,13 +3403,14 @@ qemuMonitorBlockStream(qemuMonitor *mon, int qemuMonitorBlockJobCancel(qemuMonitor *mon, - const char *jobname) + const char *jobname, + bool force) { - VIR_DEBUG("jobname=3D%s", jobname); + VIR_DEBUG("jobname=3D%s force=3D%d", jobname, force); QEMU_CHECK_MONITOR(mon); - return qemuMonitorJSONBlockJobCancel(mon, jobname); + return qemuMonitorJSONBlockJobCancel(mon, jobname, force); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 230d00a894..95f1a10e31 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1081,7 +1081,8 @@ int qemuMonitorBlockStream(qemuMonitor *mon, ATTRIBUTE_NONNULL(2); int qemuMonitorBlockJobCancel(qemuMonitor *mon, - const char *jobname) + const char *jobname, + bool force) ATTRIBUTE_NONNULL(2); int qemuMonitorBlockJobSetSpeed(qemuMonitor *mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 8f3ccb0c63..dc74c86158 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5217,13 +5217,15 @@ qemuMonitorJSONBlockStream(qemuMonitor *mon, int qemuMonitorJSONBlockJobCancel(qemuMonitor *mon, - const char *jobname) + const char *jobname, + bool force) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; if (!(cmd =3D qemuMonitorJSONMakeCommand("block-job-cancel", "s:device", jobname, + "B:force", force, NULL))) return -1; diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 0846325a81..486ba5a593 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -325,7 +325,8 @@ int qemuMonitorJSONBlockStream(qemuMonitor *mon, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int qemuMonitorJSONBlockJobCancel(qemuMonitor *mon, - const char *jobname) + const char *jobname, + bool force) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 8ed6509159..9e53b65289 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1218,7 +1218,7 @@ GEN_TEST_FUNC(qemuMonitorJSONBitmapRemove, "foodev", = "newnode") GEN_TEST_FUNC(qemuMonitorJSONJobDismiss, "jobname") GEN_TEST_FUNC(qemuMonitorJSONJobCancel, "jobname", false) GEN_TEST_FUNC(qemuMonitorJSONJobComplete, "jobname") -GEN_TEST_FUNC(qemuMonitorJSONBlockJobCancel, "jobname") +GEN_TEST_FUNC(qemuMonitorJSONBlockJobCancel, "jobname", true) static int testQemuMonitorJSONqemuMonitorJSONNBDServerStart(const void *opaque) --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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 Reviewed-by: Michal Privoznik --- 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 From nobody Sun May 19 12:26:34 2024 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=1619014096; cv=none; d=zohomail.com; s=zohoarc; b=nVVvksSpnJldHrHVjFjBQXedRbmoyMnSNIl0PPxEZMAgULH89PNZ9WnUdfJYILy2xB1qoiXO68TPnvo2CCD7w5fdcl4+zyg6FiQck+fA7+/Y9/qI8uFGAywYx+z3M3jE7Y0keEr3Kf9fea4f+ILQGWm2bzAsEn91rm47P1YFh1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619014096; 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=b9iq4wHQ7jM4px08/mGQopu7Bq7Rn3OKP1NMRlaigZQ=; b=SDrZV8HFzGH9F/x1oZ0BVa5Pm4Exov7RwkjF95PLg1mgc9GBvPJ7WMYCPyxtKhCHBz2rc7JrgiD+0nGDH+OTfNLuxQgUi7Vw3dzPDJnyx07oVPZ93xYNSQXa9nfCjaUYT0pNImmbm1W3alm6JRnhqjqFHUwvcxp2LiAa+gNo/2U= 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 1619014096319808.3532723161926; Wed, 21 Apr 2021 07:08:16 -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-547-MqTgBouIMdyekp7F7EPStw-1; Wed, 21 Apr 2021 10:06:10 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 458C8835B77; Wed, 21 Apr 2021 14:05:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E870660C5F; Wed, 21 Apr 2021 14:05:01 +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 976331806D1A; Wed, 21 Apr 2021 14:05:01 +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 13LE4pPO023990 for ; Wed, 21 Apr 2021 10:04:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 21A2F6091B; Wed, 21 Apr 2021 14:04:51 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 732816085A for ; Wed, 21 Apr 2021 14:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619014094; 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=b9iq4wHQ7jM4px08/mGQopu7Bq7Rn3OKP1NMRlaigZQ=; b=DixfBIVnL+CqQ+Y3cr2luWT06E80Xs/QUAFhiqfDyBHlLwINjTSseWBVFMn6qT/K7jZP8A DqnUZFxkvgxxJFFyRrmK1oXrbPvpQG3EbFCnL7jNjdxtbca0IlirC8fasotjuUpWtCE2a0 On+nXJVEINAz2DAu6E27R377R1Q1TH8= X-MC-Unique: MqTgBouIMdyekp7F7EPStw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/10] qemuBackupJobCancelBlockjobs: Replace qemuMonitorJobCancel by qemuMonitorBlockJobCancel Date: Wed, 21 Apr 2021 16:04:35 +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.12 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 backup jobs we can cancel the jobs forcefully since the code is on a cleanup path when the job fails. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index df9ca5b99f..4f1e3b7bad 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -676,7 +676,7 @@ qemuBackupJobCancelBlockjobs(virDomainObj *vm, if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0) return; - rc =3D qemuMonitorJobCancel(priv->mon, job->name, false); + rc =3D qemuMonitorBlockJobCancel(priv->mon, job->name, true); if (qemuDomainObjExitMonitor(priv->driver, vm) < 0) return; --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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 Reviewed-by: Michal Privoznik --- 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 From nobody Sun May 19 12:26:34 2024 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=1619013987; cv=none; d=zohomail.com; s=zohoarc; b=baI3TeNNX7BpbIm025JChtxoHiYnk2F6x981uBE5OA1yVnjkwU5IJBrI4P6L8A1nhOENOGlYteoAkazZ9uNoJkFOrsUiIdyZq31/79Vgx3kuQF8+n6XxGcygQjo+lXSlKH195yZM5HIFs9y6fC8NDYhlknud/6TEAOjebTaV8X8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013987; 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=K+T2BeQuLb2qV7blCMNM+xatTfWCwLyw8SdjtKYa8fE=; b=lDajRsuReWPl23gIA1JQYPzVmmQdfVKDcuYWYtfq8Vt5wHM9B1r0Qu/5r6JWuAlwxL9Tdj7fWll+ZQ2LnzLyuaoxv3UdJ0CWc8Nzv7ui9VsW7hoUlnHss7aaLE8OAVH5h6SG39yfBSp5AAWWzZu0XgKq26WWVuDbjOtCm5TEXU4= 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 1619013986836179.70417036146728; Wed, 21 Apr 2021 07:06:26 -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-516-x7G30gr2OaK78QnXj3Ukxw-1; Wed, 21 Apr 2021 10:06:12 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92AC883DE78; Wed, 21 Apr 2021 14:05:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24AD317F77; Wed, 21 Apr 2021 14:05:09 +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 C75A81806D1A; Wed, 21 Apr 2021 14:05:08 +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 13LE4rAO024021 for ; Wed, 21 Apr 2021 10:04:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 96E6E6091B; Wed, 21 Apr 2021 14:04:53 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5BCC6085A for ; Wed, 21 Apr 2021 14:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013984; 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=K+T2BeQuLb2qV7blCMNM+xatTfWCwLyw8SdjtKYa8fE=; b=eTMrDiFh5SRILIxody9Z5iUe/ZPEvq1DeKbRAyTA6La9v5jELrnroROGRjJ9JQlDeR92yv rQCYgPCAjBbNxeWy/6W5C4VAKGjURDIyRFNi7EOnEpXdpJFpipsZlGg7/YZ8/MviCpXT6d +q/Efit4bOmTsfhgZ+F1q5LMAoCpkDE= X-MC-Unique: x7G30gr2OaK78QnXj3Ukxw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/10] qemuMigrationSrcNBDCopyCancel*: Rename 'check' to 'abortMigration' Date: Wed, 21 Apr 2021 16:04:37 +0200 Message-Id: <0c411dcbb23e9e2cd2f120720ceb649cc3376ec6.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.84 on 10.5.11.23 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" Rename the parameter so that it's more clear what state we are in and fix all callees. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index b9143166cb..c09f6de153 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -615,9 +615,10 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObj *vm, /* - * If @check is true, the function will report an error and return a diffe= rent - * code in case a block job fails. This way we can properly abort migratio= n in - * case some block jobs failed once all memory has already been transferre= d. + * If @abortMigration is false, the function will report an error and retu= rn a + * different code in case a block job fails. This way we can properly abort + * migration in case some block jobs failed once all memory has already be= en + * transferred. * * Returns 1 if all mirrors are gone, * 0 if some mirrors are still active, @@ -627,7 +628,7 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObj *vm, static int qemuMigrationSrcNBDCopyCancelled(virDomainObj *vm, qemuDomainAsyncJob asyncJob, - bool check) + bool abortMigration) { size_t i; size_t active =3D 0; @@ -649,7 +650,7 @@ qemuMigrationSrcNBDCopyCancelled(virDomainObj *vm, qemuBlockJobUpdate(vm, job, asyncJob); switch (job->state) { case VIR_DOMAIN_BLOCK_JOB_FAILED: - if (check) { + if (!abortMigration) { qemuMigrationNBDReportMirrorError(job, disk->dst); failed =3D true; } @@ -710,7 +711,7 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver, virDomainObj *vm, virDomainDiskDef *disk, qemuBlockJobData *job, - bool failNoJob, + bool abortMigration, qemuDomainAsyncJob asyncJob) { qemuDomainObjPrivate *priv =3D vm->privateData; @@ -720,7 +721,7 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver, switch (job->state) { case VIR_DOMAIN_BLOCK_JOB_FAILED: case VIR_DOMAIN_BLOCK_JOB_CANCELED: - if (failNoJob) { + if (!abortMigration) { qemuMigrationNBDReportMirrorError(job, disk->dst); return -1; } @@ -745,7 +746,7 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver, * qemuMigrationSrcNBDCopyCancel: * @driver: qemu driver * @vm: domain - * @check: if true report an error when some of the mirrors fails + * @abortMigration: The migration is being cancelled. * * Cancel all drive-mirrors started by qemuMigrationSrcNBDStorageCopy. * Any pending block job events for the affected disks will be processed a= nd @@ -757,7 +758,7 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver, static int qemuMigrationSrcNBDCopyCancel(virQEMUDriver *driver, virDomainObj *vm, - bool check, + bool abortMigration, qemuDomainAsyncJob asyncJob, virConnectPtr dconn) { @@ -784,7 +785,7 @@ qemuMigrationSrcNBDCopyCancel(virQEMUDriver *driver, } rv =3D qemuMigrationSrcNBDCopyCancelOne(driver, vm, disk, job, - check, asyncJob); + abortMigration, asyncJob); if (rv !=3D 0) { if (rv < 0) { if (!err) @@ -798,8 +799,8 @@ qemuMigrationSrcNBDCopyCancel(virQEMUDriver *driver, virObjectUnref(job); } - while ((rv =3D qemuMigrationSrcNBDCopyCancelled(vm, asyncJob, check)) = !=3D 1) { - if (check && !failed && + while ((rv =3D qemuMigrationSrcNBDCopyCancelled(vm, asyncJob, abortMig= ration)) !=3D 1) { + if (!abortMigration && !failed && dconn && virConnectIsAlive(dconn) <=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, "%s", _("Lost connection to destination host")); @@ -4272,7 +4273,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, } if (mig->nbd && - qemuMigrationSrcNBDCopyCancel(driver, vm, true, + qemuMigrationSrcNBDCopyCancel(driver, vm, false, QEMU_ASYNC_JOB_MIGRATION_OUT, dconn) < 0) goto error; @@ -4350,7 +4351,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, /* cancel any outstanding NBD jobs */ if (mig && mig->nbd) - qemuMigrationSrcNBDCopyCancel(driver, vm, false, + qemuMigrationSrcNBDCopyCancel(driver, vm, true, QEMU_ASYNC_JOB_MIGRATION_OUT, dconn); @@ -6054,7 +6055,7 @@ qemuMigrationSrcCancel(virQEMUDriver *driver, } if (storage && - qemuMigrationSrcNBDCopyCancel(driver, vm, false, + qemuMigrationSrcNBDCopyCancel(driver, vm, true, QEMU_ASYNC_JOB_NONE, NULL) < 0) return -1; --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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=1619013974; cv=none; d=zohomail.com; s=zohoarc; b=ZTlbb1+0UEDvBE6AOTQsbjWdfxMzTYkPsbal1LT3D31QfHPqoAGenTR+pyCmQATbtKZnGP7ToBKuKKtBgK3HxcB8ajY9GiH5u6+ZfUVKqmmVA3yO5L/eJp8AiBFtKHqDmBfFMo1cgSdt4OQJeWdA34TMG09f4khhpQLSQqb8ygw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013974; 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=AgkwgjtXrqL3PP14Q52rQKicYbgE7K62sM4tCb26NvQ=; b=mRi7a74APkht+MTlpdb7I3wdsvlFhfg+H4BQba02d5J2Gr90gh+8ntHnCq2FGrdKeUBNB/DT+rd/B+WJk/Bo43vkD/+eTASvtsTUuugSfbYbPGh8wHc9wgB2iFDL+l2Z6y+AoTh3w7wRUd8WCiMNukEfR+q30q/um5KTrb3zWHk= 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 1619013974131189.5695916550177; Wed, 21 Apr 2021 07:06:14 -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-112-1TpEeq3yNfe6xyH1L-IPVA-1; Wed, 21 Apr 2021 10:06:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EDAD683DBF8; 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 090E9100760B; 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 B850C44A58; Wed, 21 Apr 2021 14:04: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 13LE4toI024037 for ; Wed, 21 Apr 2021 10:04:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id A6AB160C03; Wed, 21 Apr 2021 14:04:55 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99B4C60939 for ; Wed, 21 Apr 2021 14:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013971; 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=AgkwgjtXrqL3PP14Q52rQKicYbgE7K62sM4tCb26NvQ=; b=gOJoJw6y/1dCIZkCMOEaYaWyA89B9yu66KF1wVZzm+FI/D0dOYkKRu2uQG6bRbcVTQrnls WtsJQPi/bS/zuX6TpiWLl3y7pKIX4rB4mbDQ4g03QBW9S+xN8dbfeoILB54ShekA2XekjE egprBP342pTV/1d4AIoH11+/I08bG9c= X-MC-Unique: 1TpEeq3yNfe6xyH1L-IPVA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/10] qemuMigrationSrcNBDCopyCancelOne: Force-cancel disk copy jobs when aborting migration Date: Wed, 21 Apr 2021 16:04:38 +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.84 on 10.5.11.22 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 don't require that the data is consistent on the destination if aborting the migration. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index c09f6de153..acbae36964 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -733,7 +733,9 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver, if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) return -1; - rv =3D qemuMonitorBlockJobCancel(priv->mon, job->name, false); + /* when we are aborting the migration we don't care about the data + * consistency on the destination so that we can force cancel the mirr= or */ + rv =3D qemuMonitorBlockJobCancel(priv->mon, job->name, abortMigration); if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0) return -1; --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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=1619013972; cv=none; d=zohomail.com; s=zohoarc; b=D18icdsJiLNPK6kKHJKMlmJcBDIzhwZEnsJBzix1u7Nb6h4faUOQIHw4HGgBl5qzNfYJbE/yIgB3N6tah8vjkYlhbL7jtsoQ9bE6wLLg2/IgoDYuj89XSUcw8b5Ek8vMHGDPirG7QL1kEm/155b1X/ktm4ja1+hJqfGbemuDeq4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619013972; 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=BdLTtgxwofBF03t4kBkJkae1+oUlDbT7pvw5hIIwEWE=; b=WKoqvzz1e1C1rnDZafgJy8/JgqIjp7IpwZdwXC0g8pBowSjUoSxDU3o9XXShy5U2e5+tMeQia+hA2+JShydCh+USKiayjKlTKvwwn+gJ5lXHm61GFlP+BaZdLVIbMwwbj+8ZEyuHoL7rGqWCdGYycrZ7njwwxupiJJIrX1UCK8o= 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 1619013972966914.6816284992466; Wed, 21 Apr 2021 07:06:12 -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-365-Uqo1rioWNTuH8y_HCFxQFQ-1; Wed, 21 Apr 2021 10:06:00 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E575010939DD; Wed, 21 Apr 2021 14:05:02 +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 51DD11000358; Wed, 21 Apr 2021 14:05:02 +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 0673B44A5E; Wed, 21 Apr 2021 14:05:02 +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 13LE4u0J024052 for ; Wed, 21 Apr 2021 10:04:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB96B6085A; Wed, 21 Apr 2021 14:04:56 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22CF960CCF for ; Wed, 21 Apr 2021 14:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619013971; 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=BdLTtgxwofBF03t4kBkJkae1+oUlDbT7pvw5hIIwEWE=; b=HBcgnYl2X4Ac2ugHRR9OaU7MyR537DKuWhkNx4tw0hjQVUbShtknT312aTht/7wousIIce VoIw/oxvtn2VuCs7MMsVJQGb6nq1qDIkl1hgnCUuVDdmcKtCxfPS6DTw6h6kNIdpgTja3X aT5HI08qryC0v7GxeWezjlGw0NL2eiQ= X-MC-Unique: Uqo1rioWNTuH8y_HCFxQFQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 09/10] qemuMigrationSrcNBDCopyCancelled: Use do-while loop instead of jumping back Date: Wed, 21 Apr 2021 16:04:39 +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.84 on 10.5.11.22 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" Jumping back in the code is an anti-pattern that should be avoided if possible. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration.c | 73 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index acbae36964..dcecee0ed5 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -635,50 +635,49 @@ qemuMigrationSrcNBDCopyCancelled(virDomainObj *vm, size_t completed =3D 0; bool failed =3D false; - retry: - for (i =3D 0; i < vm->def->ndisks; i++) { - virDomainDiskDef *disk =3D vm->def->disks[i]; - qemuDomainDiskPrivate *diskPriv =3D QEMU_DOMAIN_DISK_PRIVATE(disk); - qemuBlockJobData *job; + do { + active =3D 0; + completed =3D 0; - if (!diskPriv->migrating) - continue; + for (i =3D 0; i < vm->def->ndisks; i++) { + virDomainDiskDef *disk =3D vm->def->disks[i]; + qemuDomainDiskPrivate *diskPriv =3D QEMU_DOMAIN_DISK_PRIVATE(d= isk); + qemuBlockJobData *job; - if (!(job =3D qemuBlockJobDiskGetJob(disk))) - continue; + if (!diskPriv->migrating) + continue; - qemuBlockJobUpdate(vm, job, asyncJob); - switch (job->state) { - case VIR_DOMAIN_BLOCK_JOB_FAILED: - if (!abortMigration) { - qemuMigrationNBDReportMirrorError(job, disk->dst); - failed =3D true; - } - G_GNUC_FALLTHROUGH; - case VIR_DOMAIN_BLOCK_JOB_CANCELED: - case VIR_DOMAIN_BLOCK_JOB_COMPLETED: - diskPriv->migrating =3D false; - break; + if (!(job =3D qemuBlockJobDiskGetJob(disk))) + continue; - default: - active++; - } + qemuBlockJobUpdate(vm, job, asyncJob); + switch (job->state) { + case VIR_DOMAIN_BLOCK_JOB_FAILED: + if (!abortMigration) { + qemuMigrationNBDReportMirrorError(job, disk->dst); + failed =3D true; + } + G_GNUC_FALLTHROUGH; + case VIR_DOMAIN_BLOCK_JOB_CANCELED: + case VIR_DOMAIN_BLOCK_JOB_COMPLETED: + diskPriv->migrating =3D false; + break; - if (job->state =3D=3D VIR_DOMAIN_BLOCK_JOB_COMPLETED) - completed++; + default: + active++; + } - virObjectUnref(job); - } + if (job->state =3D=3D VIR_DOMAIN_BLOCK_JOB_COMPLETED) + completed++; - /* Updating completed block job drops the lock thus we have to recheck - * block jobs for disks that reside before the disk(s) with completed - * block job. - */ - if (completed > 0) { - completed =3D 0; - active =3D 0; - goto retry; - } + virObjectUnref(job); + } + + /* Updating completed block job drops the lock thus we have to rec= heck + * block jobs for disks that reside before the disk(s) with comple= ted + * block job. + */ + } while (completed > 0); if (failed) { if (active) { --=20 2.30.2 From nobody Sun May 19 12:26:34 2024 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=1619014287; cv=none; d=zohomail.com; s=zohoarc; b=Tl68ukJKvVubq/4gedWLz1JgNG8iD58xd11MaegcBIrQEVKk1+IikpoN7AFitJitbeI1GlkmVqA9gcRNTmwgDeFYMrjynQvsfORcGmvd23KyBTXrVsmXnJ/P3h0PDb8Z3bGZXgUKsQ64XX6Z0PhnAWZEPWodwk3c5UI28zEc73I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619014287; 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=gwEqAKjpzcNlPis6BMOYUyAVwY1yBti1ilq6cxmuIsw=; b=ctjY/rzea8HH7kQAYS5FWvyyQrWgw1GXBurI9uAto5qegBud8SQQSVOSn44WPs+VZ34aMS4J+SLRDN/tlZ4iO5pq6k35D/QhUnS64POzSbzidgdqe3o+j3sSe90uw+lD+zFcsKGtkzmBTxwVdM5XwkFSEC8CNnMQq40G89lZ6lk= 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 1619014287397382.3306328253608; Wed, 21 Apr 2021 07:11:27 -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-482-2aMrp2gRPYWJhUVQauLmBg-1; Wed, 21 Apr 2021 10:06:24 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 887FA8AAE3F; Wed, 21 Apr 2021 14:05:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A4FA19D9B; Wed, 21 Apr 2021 14:05:12 +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 0A6E71806D1C; Wed, 21 Apr 2021 14:05:12 +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 13LE4vw8024058 for ; Wed, 21 Apr 2021 10:04:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id E54606091B; Wed, 21 Apr 2021 14:04:57 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 460F36085A for ; Wed, 21 Apr 2021 14:04:57 +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=gwEqAKjpzcNlPis6BMOYUyAVwY1yBti1ilq6cxmuIsw=; b=WaIMCrlCqRCEaoZvzRbdk5WdXtSJCrjWf5ivOW5Pn3+c3FE5zLL81sRB8ylajSTcrd78e5 LQxqd4Je0g/HZx0ZfdRoUvUsEXeN0AkMsV5h+F6Z7PkUUUUfCvxriwDSI4Ndwk2EPov8y9 vP2GJwFrY8rWzMBBetw2CA4YYljcqNc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619014286; 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=gwEqAKjpzcNlPis6BMOYUyAVwY1yBti1ilq6cxmuIsw=; b=TPn11Ko7SgjT3liwhYNyDjejEidR81EEd4Ud4AK5dd6/Mz/jd6cvAMmJX7b/8V1QILqEJp SPZijuYy3caFOhqhyHcmaRnYr4GkQGp2PZoASHyXdhRALe22psP1yHpFUXKn2Tdc5yJYYz tWwqdqYd3TsbzOOUk2wa3OUDil7K8bw= X-MC-Unique: 2aMrp2gRPYWJhUVQauLmBg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/10] qemu: monitor: Remove qemuMonitorJobCancel Date: Wed, 21 Apr 2021 16:04:40 +0200 Message-Id: <5da39fd5ddbb8dbd121d76d2468963f2e8c59706.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.84 on 10.5.11.23 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" The API is unused since last commit. Remove it. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 13 ------------- src/qemu/qemu_monitor.h | 5 ----- src/qemu/qemu_monitor_json.c | 28 ---------------------------- src/qemu/qemu_monitor_json.h | 5 ----- tests/qemumonitorjsontest.c | 2 -- 5 files changed, 53 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index fa8a027aa6..23161a0088 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3448,19 +3448,6 @@ qemuMonitorJobDismiss(qemuMonitor *mon, } -int -qemuMonitorJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) -{ - VIR_DEBUG("jobname=3D'%s' quiet=3D%d", jobname, quiet); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONJobCancel(mon, jobname, quiet); -} - - int qemuMonitorJobComplete(qemuMonitor *mon, const char *jobname) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 95f1a10e31..420a85942a 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1106,11 +1106,6 @@ int qemuMonitorJobDismiss(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(2); -int qemuMonitorJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) - ATTRIBUTE_NONNULL(2); - int qemuMonitorJobComplete(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(2); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index dc74c86158..8de0e4b638 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5319,34 +5319,6 @@ qemuMonitorJSONJobDismiss(qemuMonitor *mon, } -int -qemuMonitorJSONJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) -{ - g_autoptr(virJSONValue) cmd =3D NULL; - g_autoptr(virJSONValue) reply =3D NULL; - - if (!(cmd =3D qemuMonitorJSONMakeCommand("job-cancel", - "s:id", jobname, - NULL))) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - if (quiet) { - if (virJSONValueObjectHasKey(reply, "error") !=3D 0) - return -1; - } else { - if (qemuMonitorJSONBlockJobError(cmd, reply, jobname) < 0) - return -1; - } - - return 0; -} - - int qemuMonitorJSONJobComplete(qemuMonitor *mon, const char *jobname) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 486ba5a593..8d8f2de479 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -348,11 +348,6 @@ int qemuMonitorJSONJobDismiss(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - int qemuMonitorJSONJobComplete(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 9e53b65289..e36036e0d2 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1216,7 +1216,6 @@ GEN_TEST_FUNC(qemuMonitorJSONBlockdevMediumRemove, "f= oodev") GEN_TEST_FUNC(qemuMonitorJSONBlockdevMediumInsert, "foodev", "newnode") GEN_TEST_FUNC(qemuMonitorJSONBitmapRemove, "foodev", "newnode") GEN_TEST_FUNC(qemuMonitorJSONJobDismiss, "jobname") -GEN_TEST_FUNC(qemuMonitorJSONJobCancel, "jobname", false) GEN_TEST_FUNC(qemuMonitorJSONJobComplete, "jobname") GEN_TEST_FUNC(qemuMonitorJSONBlockJobCancel, "jobname", true) @@ -3121,7 +3120,6 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONBlockdevMediumInsert); DO_TEST_GEN(qemuMonitorJSONBitmapRemove); DO_TEST_GEN(qemuMonitorJSONJobDismiss); - DO_TEST_GEN(qemuMonitorJSONJobCancel); DO_TEST_GEN(qemuMonitorJSONJobComplete); DO_TEST_GEN(qemuMonitorJSONBlockJobCancel); DO_TEST(qemuMonitorJSONGetBalloonInfo); --=20 2.30.2