From nobody Tue Dec 16 11:09:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1673027546; cv=none; d=zohomail.com; s=zohoarc; b=IOVwLCcJNTORfLWnWuOyqrB6C0K05QzjsTHaSYXFP16+OH3hn1RKDl7tGaLaklCkdqG7fxE2/7bQA3zPQkPEJBQ5GSFAdPp5e/zaUWsFDtL9o0owQKHLjNdeSZagOMOC6BujAZ0TcKuLgk8kKtXqNcs2HxcNrc7X8sl2E46/lV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673027546; 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=+aXQLqpIZTW6Qpmi97ZyGOmxbM+HsL7RUbTHXiqlySc=; b=OgtyGQB3vkG+ko0EgWgC1lj3cFbueIoYV3EIJJl49Ja6pSumTCHiIG2dikGW3laTy8imnpj3vFs+bEcPRhxEk7lo2MRXBiD66d9V37WrLT5wGW+sFpYGj0HDuP8i5OTF0yIRzj8PAVel0uiTVHTxD1JDEbrQW311wK0yGHPlDYQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1673027546882926.4469244489538; Fri, 6 Jan 2023 09:52:26 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-673-HUL1Pu-xMmmNGOLly7IeAw-1; Fri, 06 Jan 2023 12:52:22 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 49BEA1875043; Fri, 6 Jan 2023 17:52:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 336F32027001; Fri, 6 Jan 2023 17:52:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F118119459C5; Fri, 6 Jan 2023 17:52:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2AA0E1947074 for ; Fri, 6 Jan 2023 17:52:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 10F2340C2008; Fri, 6 Jan 2023 17:52:18 +0000 (UTC) Received: from antique-work.redhat.com (ovpn-193-172.brq.redhat.com [10.40.193.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id A348840C2064 for ; Fri, 6 Jan 2023 17:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673027545; 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=+aXQLqpIZTW6Qpmi97ZyGOmxbM+HsL7RUbTHXiqlySc=; b=ZJ1HM7mUl3lv0rjsV+AwizFjKMiK6JLBA8UzjGyuHKxLJuEiz6eigw7sKk4h9ig1RKrWty e2nf5A2amCPrqwrGIjt/oYkhLWs4YIG+QDhFpJjmNYA0gVyXluWjXtkq60ZdoqQyQv+MKn wE3izxoTCY2TXxUxTvtTCVLuPP9/3Qo= X-MC-Unique: HUL1Pu-xMmmNGOLly7IeAw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v3 05/32] qemu_block: add async domain job support to qemuBlockPivot Date: Fri, 6 Jan 2023 18:51:40 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673027549006100003 Content-Type: text/plain; charset="utf-8"; x-default="true" This will allow to use it while having async domain job active which we will use when deleting external snapshots. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_block.c | 4 +++- src/qemu/qemu_block.h | 1 + src/qemu/qemu_driver.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index d2a56ba19c..6a68362708 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3402,6 +3402,7 @@ qemuBlockCommit(virDomainObj *vm, int qemuBlockPivot(virDomainObj *vm, qemuBlockJobData *job, + virDomainAsyncJob asyncJob, virDomainDiskDef *disk) { g_autoptr(qemuBlockStorageSourceChainData) chainattachdata =3D NULL; @@ -3487,7 +3488,8 @@ qemuBlockPivot(virDomainObj *vm, break; } =20 - qemuDomainObjEnterMonitor(vm); + if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0) + return -1; =20 if (chainattachdata) { if ((rc =3D qemuBlockStorageSourceChainAttach(priv->mon, chainatta= chdata)) =3D=3D 0) { diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index a76d9be711..3f2082f102 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -290,4 +290,5 @@ qemuBlockCommit(virDomainObj *vm, int qemuBlockPivot(virDomainObj *vm, qemuBlockJobData *job, + virDomainAsyncJob asyncJob, virDomainDiskDef *disk); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f7a7086b3d..970cc29eaf 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14158,7 +14158,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, qemuBlockJobSyncBegin(job); =20 if (pivot) { - if ((ret =3D qemuBlockPivot(vm, job, disk)) < 0) + if ((ret =3D qemuBlockPivot(vm, job, VIR_ASYNC_JOB_NONE, disk)) < = 0) goto endjob; } else { qemuDomainObjEnterMonitor(vm); --=20 2.39.0