From nobody Sun Feb 8 21:33:04 2026 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=1670506400; cv=none; d=zohomail.com; s=zohoarc; b=Lz6VTXy+5EB2HvBBaEB1Ix2Mark3sES/M3jEONOLx1416OfWmH6oMUMJF6E1h/03UMVB51FkUDX0jzP4yvSPXI1EzOkpio1UuU/CUX5tF8eO3bFQhtdq75SBlqtYu2WwjMLpMfCk4WNxMP6lollWoOpl/LMQ7GuYdLVSjDcTO88= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670506400; 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=2kxqyTAGC3tnlW3GD4VgtSL4ynB+Z7NZ9qbKdGx98zU=; b=dGKU1kueZNn5RDt+5CLWKyElX3C65+vRVIsLGHy59vxp1TzPWLhbVHrUHrfNAeuG0cI4AZFdYbDH3Gv1yvwM97cclg93bONwYJ4PwxwD/R7tH0a5e0mMGHP+CqhGl+CViEvUFz8McpeO2aUAoiL4DtywcGTcgFgZZG9dFTMYiYA= 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) 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 1670506400978359.7845557415925; Thu, 8 Dec 2022 05:33:20 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-99-P5BhJx0vPcGO4qFm0fFIbQ-1; Thu, 08 Dec 2022 08:31:56 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B5D4D3C1106E; Thu, 8 Dec 2022 13:31:41 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CAF649BB60; Thu, 8 Dec 2022 13:31:41 +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 F15391946A44; Thu, 8 Dec 2022 13:31:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F19A21946A41 for ; Thu, 8 Dec 2022 13:31:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6BA4340C6E16; Thu, 8 Dec 2022 13:31:21 +0000 (UTC) Received: from localhost.localdomain (ovpn-194-45.brq.redhat.com [10.40.194.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04F6940C6EC2 for ; Thu, 8 Dec 2022 13:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670506399; 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=2kxqyTAGC3tnlW3GD4VgtSL4ynB+Z7NZ9qbKdGx98zU=; b=AL21SFdEv4YjCXVg+HYOwnbxwnOeYPTTU6MWzyYC1MEdNIBL5tr60fYZpYOXq4K2OfPb/H aZTsQiWiFikQ6h4GYiwo9cZ+9n17mycsduYLIo/RTuZ5zWsyHekVZqic3zDN4Wik2sD6hz chW+5EJv1GSrS7vaW8V2EJSvc/olJoA= X-MC-Unique: P5BhJx0vPcGO4qFm0fFIbQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 09/30] qemu_block: introduce qemuBlockFinalize Date: Thu, 8 Dec 2022 14:30:45 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.9 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: 1670506402730100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_block.c | 19 +++++++++++++++++++ src/qemu/qemu_block.h | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 2abddf904f..24c82377b0 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3509,3 +3509,22 @@ qemuBlockPivot(virDomainObj *vm, =20 return ret; } + + +int +qemuBlockFinalize(virDomainObj *vm, + qemuBlockJobData *job, + virDomainAsyncJob asyncJob) +{ + int ret; + qemuDomainObjPrivate *priv =3D vm->privateData; + + if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0) + return -1; + + ret =3D qemuMonitorJobFinalize(priv->mon, job->name); + + qemuDomainObjExitMonitor(vm); + + return ret; +} diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index 7b6aec2a7d..c169432d9c 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -293,3 +293,8 @@ qemuBlockPivot(virDomainObj *vm, qemuBlockJobData *job, virDomainAsyncJob asyncJob, virDomainDiskDef *disk); + +int +qemuBlockFinalize(virDomainObj *vm, + qemuBlockJobData *job, + virDomainAsyncJob asyncJob); --=20 2.38.1