From nobody Sun Oct 5 01:49:57 2025 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=1757512961; cv=none; d=zohomail.com; s=zohoarc; b=TUtWDlHkugg6IOyvDknqqfT4sXdLayMFDcB6Y9QeOQrLjkT116uOjsZDjdsnTUvBrpg/1j7+WtRM+EijCQ15B1AI2aDXkle4HbUQPLrxcIBZpBOiW75k1DqcQ99aCR+nezKJjfgyK2NOrC9N+KuuPhA6AZamh9HhEKCV0U/lD7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757512961; 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=qLS+aXd99KEYW0qQdF6Qg5oMR4MEHNXuQbhhriSPvio=; b=STsBQPBhB2m0LYBMXNczcBycoHm4V5cUrcaCgXkT2FHZDIoJjB5rxaG5cW+e8fBsTltguvitqWBYQ7d+SvmQzX/aXQ2shnQQNSq27XZDAzBodbb3vI/L3l07B50IFMChfDMdX41GF+OiJEm39byo6KvdGIisZQ0wpuRZ2fsjntA= 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 1757512961270459.49979297927666; Wed, 10 Sep 2025 07:02:41 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DE53B43EA9; Wed, 10 Sep 2025 10:02:36 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id B8B7443EC1; Wed, 10 Sep 2025 09:58:14 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 142D143E1E; Wed, 10 Sep 2025 09:57:59 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 5406E41BB9 for ; Wed, 10 Sep 2025 09:57:51 -0400 (EDT) Received: from mx-prod-mc-03.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-147-AtX41W4XNz-ge6hkR8dDPg-1; Wed, 10 Sep 2025 09:57:49 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E7D2119541BE for ; Wed, 10 Sep 2025 13:57:48 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.8]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E64C300018D for ; Wed, 10 Sep 2025 13:57:47 +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=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, 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=1757512670; 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=qLS+aXd99KEYW0qQdF6Qg5oMR4MEHNXuQbhhriSPvio=; b=J7TLXXrglxtVsjEuhEgdrRMPHpHEBWSbbpmavX8DZT5j/kqUYhTdt/Hm0DwZFvf1dEj0LF Siav7Ko2D40YRv7g6hnU1gaNxUiTievxErVHqQw34N72scqHlzJInUPVZCORRSlXI0+ONC I1RKbdLAUer9FeYdNywLE5WIKMmwLHs= X-MC-Unique: AtX41W4XNz-ge6hkR8dDPg-1 X-Mimecast-MFC-AGG-ID: AtX41W4XNz-ge6hkR8dDPg_1757512669 To: devel@lists.libvirt.org Subject: [PATCH 4/6] qemuMigrationSrcIsSafeDisk: Check also data file propertiues for migrability Date: Wed, 10 Sep 2025 15:57:39 +0200 Message-ID: <55560fa7860583c70303b1b3c9a1f2b7bf52d520.1757512552.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WQTf3ZHeqpdBjsQY8KouUEFHpq9VmvZh-QmByt4-9e8_1757512669 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 653AN6CJC2KMMGAPEN4HYFMXZ72F5Y6F X-Message-ID-Hash: 653AN6CJC2KMMGAPEN4HYFMXZ72F5Y6F 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: 1757512964909116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa If the qcow2 data file feature (which separates the data into a separate file from the metadata) is in use the migration safety check ought co consider both the metadata and the data file for safe migration. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index ae26f74f8c..2e52e73f48 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1795,6 +1795,12 @@ qemuMigrationSrcIsSafeDisk(virDomainDiskDef *disk, &requires_safe_cache) < 0) return false; + if (disk->src->dataFileStore && + qemuMigrationSrcCheckStorageSourceSafety(disk->src->dataFileStore, + cfg, &unsafe_storage, + &requires_safe_cache) < 0) + return false; + if (unsafe_storage) { virReportError(VIR_ERR_MIGRATE_UNSAFE, "%s", _("Migration without shared storage is unsafe")); --=20 2.51.0