From nobody Sun Nov 24 00:18:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1731660198979604.0770718569398; Fri, 15 Nov 2024 00:43:18 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id DDC3718F9; Fri, 15 Nov 2024 03:43:17 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 791FF17D9; Fri, 15 Nov 2024 03:40:05 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 84CEB19E0; Fri, 15 Nov 2024 03:39:57 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C8CEE19B3 for ; Fri, 15 Nov 2024 03:39:46 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-TmR-JF4FMISJRqzdfwfcJg-1; Fri, 15 Nov 2024 03:39:44 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 218281954AFB for ; Fri, 15 Nov 2024 08:39:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0C3CD195388E for ; Fri, 15 Nov 2024 08:39:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731659986; h=from:from: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; bh=9Ma7vC7r27I/1rm4ROc02D1upTaIMi5+XHw3SXQAQmM=; b=RiTWNyZTWcowaeDQWcRztj3JbGupgsfZ8LFcq3y/94RLpGL6a2bzGB1mSBAk9EKdz4unqF QYYAL3sqcYAeEjh70hhqORfWUB3Zg8la3w7MPeRspA1KGUW4ZdHkB24MZHDqAcBi/lVwEh r8UJ1k3rT7fnGze+Zgb3d4/mjzqj5Nk= X-MC-Unique: TmR-JF4FMISJRqzdfwfcJg-1 X-Mimecast-MFC-AGG-ID: TmR-JF4FMISJRqzdfwfcJg From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 7/9] qemu: Add enum entries for 'snapshot-load' qemu job Date: Fri, 15 Nov 2024 09:39:28 +0100 Message-ID: <7c665022dc9fe7afdace3809a3a183bb03eca3f1.1731659896.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rB2aZvMSvGVPmA09Uv4J9-77ySdMmrfT221F9N747rg_1731659983 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VXT7Y2ZRNTBADQELV7JZVTSC3GPAS2J7 X-Message-ID-Hash: VXT7Y2ZRNTBADQELV7JZVTSC3GPAS2J7 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1731660200886116600 Content-Type: text/plain; charset="utf-8" The internal snapshot code will use the 'snapshot-load' command so we need to add the corresponding job type. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 1 + src/qemu/qemu_blockjob.c | 2 ++ src/qemu/qemu_blockjob.h | 1 + src/qemu/qemu_domain.c | 2 ++ 4 files changed, 6 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 692b4d350e..3c1305ec84 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3777,6 +3777,7 @@ qemuBlockPivot(virDomainObj *vm, case QEMU_BLOCKJOB_TYPE_CREATE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: + case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD: case QEMU_BLOCKJOB_TYPE_BROKEN: virReportError(VIR_ERR_OPERATION_INVALID, _("job type '%1$s' does not support pivot"), diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 6e53603fba..c35321790e 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -70,6 +70,7 @@ VIR_ENUM_IMPL(qemuBlockjob, "create", "snapshot-save", "snapshot-delete", + "snapshot-load", "broken"); static virClass *qemuBlockJobDataClass; @@ -1459,6 +1460,7 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlock= JobData *job, case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: + case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD: /* The internal snapshot jobs don't need any extra handling */ break; diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h index 6620e08c47..572a838676 100644 --- a/src/qemu/qemu_blockjob.h +++ b/src/qemu/qemu_blockjob.h @@ -67,6 +67,7 @@ typedef enum { QEMU_BLOCKJOB_TYPE_CREATE, QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE, QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE, + QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD, QEMU_BLOCKJOB_TYPE_BROKEN, QEMU_BLOCKJOB_TYPE_LAST } qemuBlockJobType; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4c0bfcd172..dfbf3dd9f0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2478,6 +2478,7 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *p= ayload, case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: + case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD: /* No private data for internal snapshot jobs */ break; @@ -3035,6 +3036,7 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemu= BlockJobData *job, case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: + case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD: /* No extra data for internal snapshot jobs. */ break; --=20 2.47.0