From nobody Tue Apr 30 17:36:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1578310636; cv=none; d=zohomail.com; s=zohoarc; b=PSTUdspepqusE52p462j+pTlWiVzr8Ql1Bo0FAPW1dFcHuEstdLond3mQzz5cwzWvEWQPWhwBFc2O9g6SwpV2ZjytmntAOi2DIEg1hUGtiBAL2HrD4ME5w2pSpJ8QZovTqXQuQ/+uE72Pq5oA+OWMfCc7GpJ+L4fGWwQKI0ebpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578310636; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=TCvY46zi/kL0QeI+p/2imgddKEoSXm0xffEx4zjYI3U=; b=IxPuy/+56PB4cpgGeuBMnujPqtNTOdjtTAadv18wNUe2bqfIA3VPurDg1fIz2rBjDksB7XiqmtZWrJsJIv+GNJn7fo69sWu3tpRAjjx5TDGYJoEKupLWsLWUiAkTIbMn5KKXO0hcz138c1V0dKq9UUKkJqqx46vddbFffWasXL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1578310636922729.9890157963223; Mon, 6 Jan 2020 03:37:16 -0800 (PST) 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-130-VmIWMkniON6XeWrlMUssQA-1; Mon, 06 Jan 2020 06:37:14 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DEA121005502; Mon, 6 Jan 2020 11:37:07 +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 6A108858A2; Mon, 6 Jan 2020 11:37: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 CF69318089C8; Mon, 6 Jan 2020 11:37:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 006Bb1kJ032369 for ; Mon, 6 Jan 2020 06:37:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4B320271A7; Mon, 6 Jan 2020 11:37:01 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6D961A8E2 for ; Mon, 6 Jan 2020 11:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578310635; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TCvY46zi/kL0QeI+p/2imgddKEoSXm0xffEx4zjYI3U=; b=GQkkPJUAKs1IUTCIzyTH8l+kBNX0xqwqfYjPgaViwL0swnf4kDt7ZCLMaVo6vI8J18DlQV ndI1u+a6QS6H7fkY/aGNuQCns2Mx0WsPQVV8/iYRyP4C8wJMnEJ/nO9PFdwtfUMl2jF9rt D1imfUsnj7fI3bJ+GdiiC+ZdnbiKWjg= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 6 Jan 2020 12:36:57 +0100 Message-Id: <7d5d0ad3e5e2f07d0ae48a0af0f8a6272c744535.1578310582.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: backup: Move capability check after inactive check 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.13 X-MC-Unique: VmIWMkniON6XeWrlMUssQA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Inactive VM doesn't have qemuCaps set thus we'd never properly report that VM backups are supported only for running VMs. Move the capability check after the active check. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- src/qemu/qemu_backup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index c0445e0869..86b10a2b8a 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -750,12 +750,6 @@ qemuBackupBegin(virDomainObjPtr vm, virCheckFlags(VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL, -1); - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("incremental backup is not supported yet")); - return -1; - } - if (!(def =3D virDomainBackupDefParseString(backupXML, priv->driver->x= mlopt, 0))) return -1; @@ -793,6 +787,12 @@ qemuBackupBegin(virDomainObjPtr vm, goto endjob; } + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) { + 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")); --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list