From nobody Mon Feb 2 07:30:15 2026 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=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769622764; cv=none; d=zohomail.com; s=zohoarc; b=B3Q1PcpIxKuy+xHLEi2KXAKrkrS6nM98lzSsGEHN8+Xtk7o1yyLxXYr84QX/wdxsdKJ97Y+/8l53q+YRGnMDFI8u6BKmw6T2bINjJ+oBr5bxAFLG1hwONOCffgGkyYE4tdcYU6nCVJ/m035P5JMoqwUiOe3WLbS/yj0PxnkgW6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769622764; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=aIrJ1Rv/qqvKrRBuR+u+jzvW6sTBaJpCVLbnUG3FTO8=; b=XCuR/mdTKgJsVEUmsDvcCGbG/VtTqIh7XmfgfCVW6NgtA2Zf7DqFCeNo4QJbV8xDUu9QVsHmlKdo1wMjoJFy6guQAcP0miF9HT84DBODo9zKNS+2O8J8r90SwPOQkQFMyq70b/zIjNsAfKjm5UN0Ln4jt6j+4nf03hPaDdcjGhY= ARC-Authentication-Results: i=1; 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=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769622764741632.3536498736395; Wed, 28 Jan 2026 09:52:44 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 966B841A2A; Wed, 28 Jan 2026 12:52:43 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 6174543E26; Wed, 28 Jan 2026 12:50:19 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id A60FF418E7; Wed, 28 Jan 2026 12:50:11 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 71972418CD for ; Wed, 28 Jan 2026 12:49:44 -0500 (EST) Received: from mx-prod-mc-01.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-422-aTsQx8i9N2ySPzwgJHWYBw-1; Wed, 28 Jan 2026 12:49:42 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E73D91944B12 for ; Wed, 28 Jan 2026 17:49:41 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 36FEF1958DC0 for ; Wed, 28 Jan 2026 17:49:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769622584; 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=aIrJ1Rv/qqvKrRBuR+u+jzvW6sTBaJpCVLbnUG3FTO8=; b=WSRrCulDIB6I+oH0zChOapt7yQik6Uwa5j0b/Y7LsW9Iyg8P2Gdwqw4Z6N9txEbbdyENB+ dSQhXBhNWPDgC6Tuagm+kuA9VObSKTr4hWj09z90gNOp4hNutEES18kKKZl1XSgAJCYfv/ mEXn4wow1J2L7+fOi+Lt4OtPYAE8R8E= X-MC-Unique: aTsQx8i9N2ySPzwgJHWYBw-1 X-Mimecast-MFC-AGG-ID: aTsQx8i9N2ySPzwgJHWYBw_1769622582 To: devel@lists.libvirt.org Subject: [PATCH 3/5] qemuMigrationDstPrepareAnyBlockDirtyBitmaps: Fix check for existing bitmaps Date: Wed, 28 Jan 2026 18:49:34 +0100 Message-ID: <0eaebab3dca6f87c65652faea3468d8f081c71d9.1769622307.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _C-WiPKBlf2CORR8ODpR_337bzteSroiXo1sNF-sL6c_1769622582 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: E7ME6CAO3KFNIPX7R2NIKSJWMUPL7HWG X-Message-ID-Hash: E7ME6CAO3KFNIPX7R2NIKSJWMUPL7HWG X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769622766876158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa On incoming migration qemu doesn't load bitmaps into memory (which makes them available under the 'dirty-bitmaps' field which we parse as the 'bitmaps' array in 'qemuBlockNamedNodeData') until ater actually resuming CPUs, thus the check for existing bitmaps never actually worked. We need to check the 'qcow2bitmaps' field instead which is populated from the qcow2 headers prior to activating the image. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 6dd022163b..a502515d93 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3230,6 +3230,8 @@ qemuMigrationDstPrepareAnyBlockDirtyBitmaps(virDomain= Obj *vm, qemuBlockNamedNodeData *nodedata; GSList *nextbitmap; + VIR_DEBUG("offer migrate bitmaps for '%s'", disk->target); + if (!(nodedata =3D virHashLookup(blockNamedNodeData, disk->nodenam= e))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to find data for block node '%1$s'"), @@ -3246,18 +3248,14 @@ qemuMigrationDstPrepareAnyBlockDirtyBitmaps(virDoma= inObj *vm, for (nextbitmap =3D disk->bitmaps; nextbitmap; nextbitmap =3D next= bitmap->next) { qemuMigrationBlockDirtyBitmapsDiskBitmap *bitmap =3D nextbitma= p->data; - size_t k; /* don't migrate into existing bitmaps */ - for (k =3D 0; k < nodedata->nbitmaps; k++) { - if (STREQ(bitmap->bitmapname, nodedata->bitmaps[k]->name))= { - bitmap->skip =3D true; - break; - } - } + if (nodedata->qcow2bitmaps) + bitmap->skip =3D g_strv_contains((const char **) nodedata-= >qcow2bitmaps, bitmap->bitmapname); + + VIR_DEBUG("offer migrate bitmap '%s' disk '%s' -> skip: '%d'", + bitmap->bitmapname, disk->target, bitmap->skip); - if (bitmap->skip) - continue; } } --=20 2.52.0