From nobody Sat May 4 05:28:37 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=1616085976; cv=none; d=zohomail.com; s=zohoarc; b=jJp4dt6op/H8mQsJ/FU2hmFvqaK/InzOw/KyogQjRoqK071pOQOmP575k+TtYuz17134QTpvFbguDBFVc/WtWBMt04VmcbyI0wX+sgjZtLZKOQoBUiLkaOSMuWc2ZgIBRN4tb2tfD/iwmeoujTnX6GNMRGP0YDQ7Ic2cBtLYdHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616085976; 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=EyBb4jWoZTWwkHvX9C6LbwAe6zBHsRbiV8UmzlHfXik=; b=CnH3xpSlbdTaolnIzJ7N8y8hp+pZFEtgtWrPTMqsuYeau5fQhbpuUhjltm4jO9f4EnYNSlwwt0+Rldb1nebkpy2i9N/WxT0cnk7ROuSXGQjPale/B5CVxyFAiCPRjT9ND72VSr0vsxOXyN5O8C+M6onjJKoLkJb2wu6E3TZs3Ks= 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 1616085976923277.35246445906205; Thu, 18 Mar 2021 09:46: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-465-GUbd08xHNyqTc0KwOvN9sg-1; Thu, 18 Mar 2021 12:46:13 -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 88E68180FCA2; Thu, 18 Mar 2021 16:46:06 +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 5CECF10023BE; Thu, 18 Mar 2021 16:46:06 +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 DD9C64BB7C; Thu, 18 Mar 2021 16:46:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12IGk4gL029843 for ; Thu, 18 Mar 2021 12:46:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 51E3210074FC; Thu, 18 Mar 2021 16:46:04 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32B4A10023BE for ; Thu, 18 Mar 2021 16:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616085975; 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=EyBb4jWoZTWwkHvX9C6LbwAe6zBHsRbiV8UmzlHfXik=; b=hsZN70ZmrypttlCj/4gG27v6SYDS9iQMaziHIjmz/SDUVG2EKzB1/OqXUfHXg3OAlSNUyP xW6gipON+zQ5uomJhS110Bvm5G94fLdUzmE/75ma4+KuIguPvwzr0naclkk+LECdDHjGxx oV9cOz8oQBQ8d5zYWB7QAzW+2ILJ3b0= X-MC-Unique: GUbd08xHNyqTc0KwOvN9sg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/3] qemu: capabilities: Introduce QEMU_CAPS_BLOCKDEV_BACKUP Date: Thu, 18 Mar 2021 17:45:55 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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" Upcoming commit will enable full backup support (incremental part requires blockdev-reopen, which won't happen in qemu for at least another release). Add a capability that the 'blockdev-backup' job is supported by qemu capped, but limited to when qemu supports QEMU_CAPS_BLOCKDEV. We can also use it in the expression to enable QEMU_CAPS_INCREMENTAL_BACKUP since it's a pre-requisite too. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 7 ++++++- src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + 17 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 447cf77875..08bd0e13ce 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -622,6 +622,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 395 */ "vnc-power-control", "audiodev", + "blockdev-backup", ); @@ -1557,6 +1558,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "netdev_add/arg-type/+vhost-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA }, { "migrate-set-parameters/arg-type/block-bitmap-mapping/bitmaps/transf= orm", QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING }, + { "blockdev-backup", QEMU_CAPS_BLOCKDEV_BACKUP }, }; typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; @@ -5168,7 +5170,10 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCap= s) void virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps) { - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV) && + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) + virQEMUCapsClear(qemuCaps, QEMU_CAPS_BLOCKDEV_BACKUP); + + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_BACKUP) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MA= PPING)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ee321df66c..792cb91ce1 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -602,6 +602,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 395 */ QEMU_CAPS_VNC_POWER_CONTROL, /* -vnc power-control option */ QEMU_CAPS_AUDIODEV, /* -audiodev instead of QEMU_AUDIO_DRV */ + QEMU_CAPS_BLOCKDEV_BACKUP, /* qemu supports the blockdev-backup job */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index b53584cfb8..371e6192e2 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -198,6 +198,7 @@ + 4001050 0 61700242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.s390x.xml index 363c4372c1..1f6f2e5833 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -160,6 +160,7 @@ + 4002000 0 39100242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index 4443974912..8f9972eb14 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -246,6 +246,7 @@ + 4002000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index 9a2b1f2061..51d83b9f47 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -208,6 +208,7 @@ + 5000000 0 61700241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index ab12f7e72c..4e6aec6fda 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -217,6 +217,7 @@ + 5000000 0 42900241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.riscv64.xml index a5e0853a42..850dda922b 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -203,6 +203,7 @@ + 5000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index 7c84402f63..7dd3e9ae89 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -253,6 +253,7 @@ + 5000000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemuca= pabilitiesdata/caps_5.1.0.sparc.xml index 35ed8312c1..5b4b9d4b5b 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -118,6 +118,7 @@ + 5001000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index dd91777c9b..71ae857c8f 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -255,6 +255,7 @@ + 5001000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.aarch64.xml index 2247606310..4417f03f13 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -212,6 +212,7 @@ + 5002000 0 61700243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index 419d05380c..f5d072b6c6 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -219,6 +219,7 @@ + 5002000 0 42900243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.riscv64.xml index 8a6ea5450b..c12477a55c 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -205,6 +205,7 @@ + 5002000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.s390x.xml index 2fd360f690..53ed7fa312 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -167,6 +167,7 @@ + 5002000 0 39100243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 17cec44cd8..1f6b2de2a1 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -256,6 +256,7 @@ + 5002000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 6d546268e4..f054aa9d69 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -259,6 +259,7 @@ + 5002050 0 43100242 --=20 2.29.2 From nobody Sat May 4 05:28:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1616085980; cv=none; d=zohomail.com; s=zohoarc; b=ldtsfOwxBprw+EQne+pKMoySAVKXGxIFiZIIjQSlmaPgNUGeBYxWLMgHspJ1pMmagyy/nqrN+c7L9aAy8kEuXXF/S50faOLULu2K8lJ0kLFWJLPezft4nzZD5W0RqS1YkjbNVbZbxHOgBpwiQvvd6tUqUJQ4zl8SulxJkKsWxh4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616085980; 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=w3yfDPpVShfnJsFrHLkKTaUZjUsPwSE8SpbUHHmDAf8=; b=De8+KxLiA5M1yoBXhKrx8uvgy2XNj0ShuyWUNZWFRovjntNMUO7Np+EQswuK9VaDaMeTctBa+GPS69Pp8SNhgZIvn2I7PxylVeIknA3/uGBkun5TjJDqHKEoGbevUiM3FSmd2//R8o4d8jCsqqZCoii8TmqxYx8o9e4itj/p44A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1616085980430551.2571765721025; Thu, 18 Mar 2021 09:46:20 -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-326-nBAAvWPzMMStEktpYFIo9A-1; Thu, 18 Mar 2021 12:46:17 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2643663CD8; Thu, 18 Mar 2021 16:46:11 +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 F27945D9D0; Thu, 18 Mar 2021 16:46:10 +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 A80B918155DD; Thu, 18 Mar 2021 16:46:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12IGk5pk029851 for ; Thu, 18 Mar 2021 12:46:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5B37210027A5; Thu, 18 Mar 2021 16:46:05 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6BD910023BE for ; Thu, 18 Mar 2021 16:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616085979; 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=w3yfDPpVShfnJsFrHLkKTaUZjUsPwSE8SpbUHHmDAf8=; b=DmOshotklnAXjIex6cG6gmTU6ATSLdyxdGyUXbQzC+XU9cgOHHaNRf3EGxFgRQphkUEaDm iBYFhghYzWm2tFrxy93IjKszM7kh4PGbcrpnnbHiebqfIZyKiH4m1n5muXs2ywPmKL2GvN LanELBGJI4od9XGjMIjtWtoYihq0uvs= X-MC-Unique: nBAAvWPzMMStEktpYFIo9A-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/3] qemu: backup: Enable full backup support Date: Thu, 18 Mar 2021 17:45:56 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.14 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" qemuBackupBegin can take a full backup of the disks (excluding any operations with bitmaps) without the need to wait for the blockdev-reopen support in qemu. Add a check that no checkpoint creation is required and the disk backup mode isn't VIR_DOMAIN_BACKUP_DISK_BACKUP_MODE_INCREMENTAL. Call to virDomainBackupAlignDisks is moved earlier as it initializes the disk backup mode if not present in user config. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_backup.c | 28 +++++++++++++++++++++++----- src/qemu/qemu_domain.c | 3 --- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index f91d632715..d89122f225 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -788,12 +788,33 @@ qemuBackupBegin(virDomainObjPtr vm, goto endjob; } - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) { + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_BACKUP)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("incremental backup is not supported yet")); + _("backup is not supported with this QEMU")); goto endjob; } + if (virDomainBackupAlignDisks(def, vm->def, suffix) < 0) + goto endjob; + + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) { + size_t i; + + if (chkdef) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("creating checkpoint for incremental backup i= s not supported yet")); + goto endjob; + } + + for (i =3D 0; i < def->ndisks; i++) { + if (def->disks[i].backupmode =3D=3D VIR_DOMAIN_BACKUP_DISK_BAC= KUP_MODE_INCREMENTAL) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("incremental backup is not supported yet"= )); + goto endjob; + } + } + } + if (priv->backup) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("another backup job is already running")); @@ -806,9 +827,6 @@ qemuBackupBegin(virDomainObjPtr vm, if (qemuBackupBeginPrepareTLS(vm, cfg, def, &tlsProps, &tlsSecretProps= ) < 0) goto endjob; - if (virDomainBackupAlignDisks(def, vm->def, suffix) < 0) - goto endjob; - actions =3D virJSONValueNewArray(); /* The 'chk' checkpoint must be rolled back if the transaction command diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ed2a1481d4..5c98f8ff1a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2322,9 +2322,6 @@ qemuDomainObjPrivateXMLFormatBackups(virBufferPtr buf, g_auto(virBuffer) attrBuf =3D VIR_BUFFER_INITIALIZER; g_auto(virBuffer) childBuf =3D VIR_BUFFER_INIT_CHILD(buf); - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) - return 0; - if (priv->backup && virDomainBackupDefFormat(&childBuf, priv->backup, true) < 0) return -1; --=20 2.29.2 From nobody Sat May 4 05:28:37 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=1616085985; cv=none; d=zohomail.com; s=zohoarc; b=LZQWuE/o4hkqLYUnFwyG7IgmM27H45nTcoJvpK+4Av8po8bd45VLWRY7kv2r8w/ONDWxqnL3qxP61Qj1Qskz3vevVqxyNYkcAhrVvEr8615PJRCaFrGWW/LQcmWeOeu0Zess3BLc2pu4sAOZRiUjlgi9Z+kVrbViu7WMSWrkvKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616085985; 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=EjsiYygfCa4ksH0TIqPB1F/E7VsJpV6sFB+4bqN5oM0=; b=Yy3nT35nm2Id8KKcIkXQ2TYVgmYT8QQohjoBHtkIUFadC46uvTfbXbAHo1avpqmenUUhwmBL7oNfr1MzvRTtrImjri8EgLs9mFw2T4XMQy+V7Ucqi/ylvL/U4iO7gx7WEevS1irouTH9+bCCK9ltw9l54gxBzKeKZRx6m/lxSRs= 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 1616085985096239.63212242748875; Thu, 18 Mar 2021 09:46:25 -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-333-W8kesoeHPQmnOOCP7Lg0SQ-1; Thu, 18 Mar 2021 12:46:20 -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 354B9180FCA8; Thu, 18 Mar 2021 16:46:14 +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 0175919D9B; Thu, 18 Mar 2021 16:46:14 +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 B1D7A180C5A5; Thu, 18 Mar 2021 16:46:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12IGk6Vd029862 for ; Thu, 18 Mar 2021 12:46:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 695CB10074FC; Thu, 18 Mar 2021 16:46:06 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id C22BE10027A5 for ; Thu, 18 Mar 2021 16:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616085984; 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=EjsiYygfCa4ksH0TIqPB1F/E7VsJpV6sFB+4bqN5oM0=; b=I/i92ofjmQ5rKreVHqeBE71w4s6PtqnNSN2U1Iv/SUd6eW/AH0+Vx0HOxBG3afE79ii/1e mxEBfpXovDPOQgsWeQVo2ZLnhvBCIr+Dzqe62euWZwCA06itVzVCMr+i928Uno9x/jgmDB 6A8xj6p+pzXx8JjPcA+pADr1k9953Nw= X-MC-Unique: W8kesoeHPQmnOOCP7Lg0SQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/3] NEWS: Mention support for full backups via virDomainBackupBegin Date: Thu, 18 Mar 2021 17:45:57 +0100 Message-Id: <06958b3b24921f004e1785ec5c21ef66d0975ea9.1616085920.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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" Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- NEWS.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 9d819a3cf2..c2013ecac9 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -24,6 +24,15 @@ v7.2.0 (unreleased) The memory dirty rate stats can be obtained through ``virsh domstats --dirtyrate`` via the virConnectGetAllDomainStats API. + * qemu: Full disk backups via ``virDomainBackupBegin`` + + The qemu hypervisor dirver now allows taking full disk backups via the + ``virDomainBackupBegin`` API and the corresponding virsh wrapper. + + In future releases the feature will be extended to also support increm= ental + backups (where only the difference since the last backup is copied) wh= en + qemu adds the required functionality. + * **Improvements** * **Bug fixes** --=20 2.29.2