From nobody Sun Feb 8 21:48:02 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1579795063; cv=none; d=zohomail.com; s=zohoarc; b=Ilr4MAXWZVhya7jimL0BCydjvjDKjZMfLv3aBtD6qCqjSpRaiZqJrUtDKIuFp5S0wLxyITpQ5hn1m1ahGLu2HNfcHJYAkpzJSo1mq5bh5xmju0U4oUYpsV4XY8xXgO+BG8GCAfFuX3lzkkW94KF8cQMx0ztE1uGIbISLv2fkFW4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579795063; h=Content-Type:Content-Transfer-Encoding:Cc: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=fbPxDGu0IQBxhvUGcDltVqcwfv82m/ZHgdukY/IVrNE=; b=ELZO4te2ydbFoikOi4y254fNuTilZ2e+vzY32caCubHR1Ijq3rwmQg9NtiNdETiO16q8EBCDSGdY7MX/gFGn2K7A8S3cTg1OpBed4I6JbF1bfBrjhX/XELcv03o1IhX2wyvaNfxN5DhNVqORQB5vmeTm+MNIN+ZCbwvmv6Cly4c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1579795063314888.2228701948642; Thu, 23 Jan 2020 07:57:43 -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-412-K9rbv8bWMRi_GutWStooYw-1; Thu, 23 Jan 2020 10:57:39 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A0418010D0; Thu, 23 Jan 2020 15:57:34 +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 64AEF1001DC0; Thu, 23 Jan 2020 15:57:34 +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 272EC1832DEA; Thu, 23 Jan 2020 15:57:34 +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 00NFvFsx012651 for ; Thu, 23 Jan 2020 10:57:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0ACC238F; Thu, 23 Jan 2020 15:57:15 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 617CE19C69; Thu, 23 Jan 2020 15:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579795062; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=fbPxDGu0IQBxhvUGcDltVqcwfv82m/ZHgdukY/IVrNE=; b=foRAu1i4EpKXFhvi4/T1UEC02Pidj9vGUo+LphuBUh5JdpAQk2xUjjKLuKpXkIy6l1Rhnf DYeZwLKxX28CbrjpCqZP4xlGv0pYSlsxpWXtAcJiTg7dcexpr3qQ6uUutOi3EjtDVYTwii 0YQK6MhfvPJh1wC24hhfvp1Uo/FdRCs= From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/4] qemu: Fix value of 'device' argument for blockdev-mirror Date: Thu, 23 Jan 2020 16:57:04 +0100 Message-Id: <5a182aeb2aac6c498230ccebdb74bffa10f4cdc2.1579794423.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Peter Krempa 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.84 on 10.5.11.22 X-MC-Unique: K9rbv8bWMRi_GutWStooYw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When using blockdev configurations the 'device' argument of 'blockdev-mirror' must correspond to the topmost node in the block node graph. Libvirt didn't do this properly in case when 'copy_on_read' option was enabled on the disk. Use qemuDomainDiskGetTopNodename to fix it for the blockdev-mirror calls in qemuDomainBlockCopy and the non-shared-storage migration. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_migration.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3218dc0e23..9e2a94306c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18386,7 +18386,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, if (blockdev) { ret =3D qemuMonitorBlockdevMirror(priv->mon, job->name, true, - disk->src->nodeformat, + qemuDomainDiskGetTopNodename(disk), mirror->nodeformat, bandwidth, granularity, buf_size, mirror_shal= low); } else { diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 29d228a8d9..d7814208a2 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -931,7 +931,7 @@ qemuMigrationSrcNBDStorageCopyOne(virQEMUDriverPtr driv= er, if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) { jobname =3D diskAlias; - sourcename =3D disk->src->nodeformat; + sourcename =3D qemuDomainDiskGetTopNodename(disk); persistjob =3D true; } else { jobname =3D NULL; --=20 2.24.1