From nobody Mon Feb 9 06:26:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1662639201; cv=none; d=zohomail.com; s=zohoarc; b=I9Hcjsi2Y5MoZ4WKz8m0EOt8oMxDTEztnKygz+auTC00gblua54q5vCvEBOBE3sJaArSiM+U+oKmIy6//zRCrOsARRTsMEHaYCOKdew+pg0HDkluvLjH2obxe8DpvWTF6C5T4TFnptK8BQ0Tv+Uu93bW6HoogwVAT5vP2uTiTb4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639201; 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=5caVgRVTCMho9av/tJpPs6CL7Wo3CSESj53bJRU+Apo=; b=PUCYcTM7rsMHUT5pJWAbvvnG3yT3oxGKQt4D4+XNs1/n1FA0D4ICS5HkSSAc6P/oonisI+rtLU6QEim7KZIVllLTfD6iGyPxJSFYSpwFdt4lmNm+sFxLFyjabkm5A/G4EWCb68fD58KNB29rpq99Q+/n5lIew5xITSAg0dLlNaQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16626392015931004.7873127636491; Thu, 8 Sep 2022 05:13:21 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-44-5l-GM1vhNDuwEQHJ5xUH4g-1; Thu, 08 Sep 2022 08:13:17 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67F4885A58C; Thu, 8 Sep 2022 12:13:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2982340E7F28; Thu, 8 Sep 2022 12:13:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 284B21946A5F; Thu, 8 Sep 2022 12:13:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 33F7C1946A44 for ; Thu, 8 Sep 2022 12:13:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 18A7E2166B29; Thu, 8 Sep 2022 12:13:12 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89E5D2166B26 for ; Thu, 8 Sep 2022 12:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639200; 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=5caVgRVTCMho9av/tJpPs6CL7Wo3CSESj53bJRU+Apo=; b=Y1P83E6vJGNV8Qpzr/BfEzUxBTvfxCj/+mX0mqyGAULDKYrDWXQa9rgcS+D1ppH1ng4LGZ 5xPGzZOlhN9CDNFIOjMaUv0NvsXo0i8Pxn6gnMv63bsBldw0OkN9Af2PjbOzg2va8U7dZv 62WENVsorBmuuUbG4npKXaQb+oXFRs8= X-MC-Unique: 5l-GM1vhNDuwEQHJ5xUH4g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/8] qemu: migration: Fix setup of non-shared storage migration in qemuMigrationSrcBeginPhase Date: Thu, 8 Sep 2022 14:13:01 +0200 Message-Id: <5e5b8a4d0427b9440beb70850c2748dec83b5ede.1662639119.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1662639203216100003 Content-Type: text/plain; charset="utf-8" In commit 6111b2352242e9 removing pre-blockdev code paths I've improperly refactored the setup of non-shared storage migration. Specifically the code checking that there are disks and setting up the NBD data in the migration cookie was originally outside of the loop checking the user provided list of specific disks to migrate, but became part of the block as it was not un-indented when a higher level block was being removed. The above caused that if non-shared storage migration is requested, but the user doesn't provide the list of disks to migrate (thus implying to migrate every appropriate disk) the code doesn't actually setup the migration and then later on falls back to the old-style migration which no longer works with blockdev. Move the check that there's anything to migrate out of the 'nmigrate_disks' block. Fixes: 6111b2352242e93c6d2c29f9549d596ed1056ce5 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2125111 Resolves: https://gitlab.com/libvirt/libvirt/-/issues/373 Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 76a65bf298..5367b74de4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2609,14 +2609,14 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, return NULL; } } + } - priv->nbdPort =3D 0; + priv->nbdPort =3D 0; - if (qemuMigrationHasAnyStorageMigrationDisks(vm->def, - migrate_disks, - nmigrate_disks)) - cookieFlags |=3D QEMU_MIGRATION_COOKIE_NBD; - } + if (qemuMigrationHasAnyStorageMigrationDisks(vm->def, + migrate_disks, + nmigrate_disks)) + cookieFlags |=3D QEMU_MIGRATION_COOKIE_NBD; } if (virDomainDefHasMemoryHotplug(vm->def) || --=20 2.37.1