From nobody Mon Feb 9 07:07:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.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=1578594115; cv=none; d=zohomail.com; s=zohoarc; b=n37fHRuPbB7ff0LN4GPwJinsTiLLvUezskso6F8gqp/vdPNKHsLsKEl0mry+RVxdYrKqTb1SF4crQo49N2gktKMt84xQfYHFVhbQKYsE/6kerxEdUOiscTBz8LShAipnyWu5LkvT9/DND03wefSt9SQT+hN2Q/xg4N2OPCU2JaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578594115; 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=rB4E2ZEDlT8dmflVL05iuYIhuY1OH9VVwLYA2oieakk=; b=Dplf1N1opZ5I4iGyV2O6wIopnNi0prLg/YhZHSyv9bEm3p/uequuHnucNZZ4wS7EuHk8AYdNBwoo9Un5lC59yg7U+URVzgBU110C3sCL/QSyWL66TlExniYocpXlFxavDg6L6Msi1zpNV7Iw+SkYeNfGVGTMN3J7qbYTHVcWEk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578594115743101.45647896300625; Thu, 9 Jan 2020 10:21:55 -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-385-J4SN8W78NsWcdPRQUJzEBw-1; Thu, 09 Jan 2020 13:21:52 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1EFFE1902EC8; Thu, 9 Jan 2020 18:21:45 +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 EAE147C3D1; Thu, 9 Jan 2020 18:21:44 +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 AD485180880B; Thu, 9 Jan 2020 18:21:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 009ILYMd018266 for ; Thu, 9 Jan 2020 13:21:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2B40A7C3D0; Thu, 9 Jan 2020 18:21:34 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 800F09A84; Thu, 9 Jan 2020 18:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578594114; 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=rB4E2ZEDlT8dmflVL05iuYIhuY1OH9VVwLYA2oieakk=; b=SkzY5LpTqEC9xpl4H7Xw6bAxge9ng6MjiturKlfLspTE6aVpLYd+iuhi+S0s7Llhg8pUMp dtb5Bo7B1qWM9cXy/ZVLkaFLUo2dQzg9Wqrv3fA1DR+mfypzSHrjWK2stlxwvotdmVC7c7 b6exOsWn2E/c1RVZIbh6gLURUpQiH/k= From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 9 Jan 2020 19:21:11 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH 05/16] qemu: checkpoint: Use disk definition directly when creating checkpoint 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.15 X-MC-Unique: J4SN8W78NsWcdPRQUJzEBw-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" Lookup the whole disk definition rather than just the node name. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_checkpoint.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 0aa854324b..03a8321135 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -320,12 +320,16 @@ qemuCheckpointAddActions(virDomainObjPtr vm, for (i =3D 0; i < def->ndisks; i++) { virDomainCheckpointDiskDef *chkdisk =3D &def->disks[i]; - const char *node; + virDomainDiskDefPtr domdisk =3D virDomainDiskByTarget(vm->def, chk= disk->name); - if (chkdisk->type !=3D VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP) + /* checkpoint definition validator mandates that the corresponding + * domdisk should exist */ + if (!domdisk || + chkdisk->type !=3D VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP) continue; - node =3D qemuDomainDiskNodeFormatLookup(vm, chkdisk->name); - if (qemuMonitorTransactionBitmapAdd(actions, node, chkdisk->bitmap= , true, false, 0) < 0) + + if (qemuMonitorTransactionBitmapAdd(actions, domdisk->src->nodefor= mat, + chkdisk->bitmap, true, false, = 0) < 0) return -1; /* We only want one active bitmap for a disk along the @@ -348,7 +352,9 @@ qemuCheckpointAddActions(virDomainObjPtr vm, if (STRNEQ(chkdisk->name, disk2->name) || disk2->type !=3D VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP) continue; - if (qemuMonitorTransactionBitmapDisable(actions, node, dis= k2->bitmap) < 0) + if (qemuMonitorTransactionBitmapDisable(actions, + domdisk->src->node= format, + disk2->bitmap) < 0) return -1; search_parents =3D false; break; --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list