From nobody Fri Dec 19 04:17:22 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571415143; cv=none; d=zoho.com; s=zohoarc; b=e0M694mNClfIST9e932YPPcei/uZFaIuEtsg9tubSmuu4xioUz0IHm9CAihXsElstD9e8BcCVwVHpSNK1QKzZmwRTQim85bYA95hW5JuuoxBJuiBl/3+Rh2r+v7Oxu/BOHiHpzEhuFC6mGmLWVcLzYY5SkdTdFfSsrmOoccy1pI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571415143; 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=tWPKty0nAYsXYtLIG3VFVxqkwz+qNGQN96IdBtKfLj0=; b=lLq2U5UpK6Fh5mWGNq8SUaIaMSSYxJtllnVuy2OE5jksO1RY1ct5xXms7n2BXptJju87GbYw2674Ey8OsYBdQMRwrDvA3HBqfhoyE+vOTBLgOMI0tOlIbn/VGIX4N3I6qwWCLBlz9/WjEfYhlcLUIJeaqBOOQYi2LS5TewxVSoU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571415143092487.92532361032465; Fri, 18 Oct 2019 09:12:23 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 6AC7A7F770; Fri, 18 Oct 2019 16:12:21 +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 42B7779A0; Fri, 18 Oct 2019 16:12:21 +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 F3B7D3FB4F; Fri, 18 Oct 2019 16:12:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9IGCIt6005239 for ; Fri, 18 Oct 2019 12:12:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id CE24B60161; Fri, 18 Oct 2019 16:12:18 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C834600C1; Fri, 18 Oct 2019 16:12:18 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 18 Oct 2019 18:11:16 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH RFC 31/40] backup: Implement backup APIs for remote driver 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 18 Oct 2019 16:12:21 +0000 (UTC) From: Eric Blake This one is fairly straightforward - the generator already does what we need. Signed-off-by: Eric Blake Reviewed-by: Daniel P. Berrang=C3=A9 --- src/remote/remote_driver.c | 3 ++ src/remote/remote_protocol.x | 53 +++++++++++++++++++++++++++++++++++- src/remote_protocol-structs | 28 +++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 9228c7d0ed..d04f2f9098 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8748,6 +8748,9 @@ static virHypervisorDriver hypervisor_driver =3D { .domainCheckpointGetParent =3D remoteDomainCheckpointGetParent, /* 5.6= .0 */ .domainCheckpointDelete =3D remoteDomainCheckpointDelete, /* 5.6.0 */ .domainGetGuestInfo =3D remoteDomainGetGuestInfo, /* 5.7.0 */ + .domainBackupBegin =3D remoteDomainBackupBegin, /* 5.9.0 */ + .domainBackupGetXMLDesc =3D remoteDomainBackupGetXMLDesc, /* 5.9.0 */ + .domainBackupEnd =3D remoteDomainBackupEnd, /* 5.9.0 */ }; static virNetworkDriver network_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index f4e3392212..8de088be6a 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -3744,6 +3744,37 @@ struct remote_connect_set_identity_args { unsigned int flags; }; +struct remote_domain_backup_begin_args { + remote_nonnull_domain dom; + remote_string disk_xml; + remote_string checkpoint_xml; + unsigned int flags; +}; + +struct remote_domain_backup_begin_ret { + int id; +}; + +struct remote_domain_backup_get_xml_desc_args { + remote_nonnull_domain dom; + int id; + unsigned int flags; +}; + +struct remote_domain_backup_get_xml_desc_ret { + remote_nonnull_string xml; +}; + +struct remote_domain_backup_end_args { + remote_nonnull_domain dom; + int id; + unsigned int flags; +}; + +struct remote_domain_backup_end_ret { + int retcode; +}; + /*----- Protocol. -----*/ /* Define the program number, protocol version and procedure numbers here.= */ @@ -6617,5 +6648,25 @@ enum remote_procedure { * @generate: client * @acl: connect:write */ - REMOTE_PROC_CONNECT_SET_IDENTITY =3D 419 + REMOTE_PROC_CONNECT_SET_IDENTITY =3D 419, + + /** + * @generate: both + * @acl: domain:checkpoint + * @acl: domain:block_write + */ + REMOTE_PROC_DOMAIN_BACKUP_BEGIN =3D 420, + + /** + * @generate: both + * @priority: high + * @acl: domain:read + */ + REMOTE_PROC_DOMAIN_BACKUP_GET_XML_DESC =3D 421, + + /** + * @generate: both + * @acl: domain:checkpoint + */ + REMOTE_PROC_DOMAIN_BACKUP_END =3D 422 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 51606e7473..b549ee0b3d 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -3114,6 +3114,31 @@ struct remote_connect_set_identity_args { } params; u_int flags; }; +struct remote_domain_backup_begin_args { + remote_nonnull_domain dom; + remote_string disk_xml; + remote_string checkpoint_xml; + u_int flags; +}; +struct remote_domain_backup_begin_ret { + int id; +}; +struct remote_domain_backup_get_xml_desc_args { + remote_nonnull_domain dom; + int id; + u_int flags; +}; +struct remote_domain_backup_get_xml_desc_ret { + remote_nonnull_string xml; +}; +struct remote_domain_backup_end_args { + remote_nonnull_domain dom; + int id; + u_int flags; +}; +struct remote_domain_backup_end_ret { + int retcode; +}; enum remote_procedure { REMOTE_PROC_CONNECT_OPEN =3D 1, REMOTE_PROC_CONNECT_CLOSE =3D 2, @@ -3534,4 +3559,7 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_CHECKPOINT_DELETE =3D 417, REMOTE_PROC_DOMAIN_GET_GUEST_INFO =3D 418, REMOTE_PROC_CONNECT_SET_IDENTITY =3D 419, + REMOTE_PROC_DOMAIN_BACKUP_BEGIN =3D 420, + REMOTE_PROC_DOMAIN_BACKUP_GET_XML_DESC =3D 421, + REMOTE_PROC_DOMAIN_BACKUP_END =3D 422, }; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list