From nobody Sun Feb 8 20:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; 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 207.211.31.81 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=1594818645; cv=none; d=zohomail.com; s=zohoarc; b=eg4TKcI8S+bwiOrA8Pv8kTo0xxxTgqqMRkf2hl5EcykjbS7uvSbzx3xWQSzCYraVbbNekXKOjoE4rEUmCkF6GJtV3wE71cqPP+vs3r4qwzblZQodegBYUz9TLsgDjvM5ZPYC9iwKZoeHyquhSfT+l551OxSR+mVWWSrVGm6Yl3E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594818645; 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=QaxXaI8CAH4aFnJRGJpRsRfAaqEX37mNWsGZsaIse6k=; b=ha4VNhx+KagZqpzUwiVWBpM1zxQeQ9rm/+px89WdqhL5FrK9LehmiNMuOn9W6zxAJ6Kv4muA7WjcvxxUrBs262yq+Lua3ztNEeEaeh9jOe/nDnjagR2b3A09cZMj4w+Kv4O+qTvK/5WFniOUbWtkGloEKgCWJlSqqEpvx5QM3kY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1594818645333326.3354348985754; Wed, 15 Jul 2020 06:10:45 -0700 (PDT) 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-41-RvUN02zXO6insRyru4BTZw-1; Wed, 15 Jul 2020 09:10:41 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE7F91009444; Wed, 15 Jul 2020 13:10:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF2B178A50; Wed, 15 Jul 2020 13:10:35 +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 8785394F17; Wed, 15 Jul 2020 13:10:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06FDARiY005797 for ; Wed, 15 Jul 2020 09:10:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3012019079; Wed, 15 Jul 2020 13:10:27 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84D4260BF4 for ; Wed, 15 Jul 2020 13:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594818644; 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=QaxXaI8CAH4aFnJRGJpRsRfAaqEX37mNWsGZsaIse6k=; b=dpIulY2glTPeMfggKxDgXM3kQItbtISiJ4SKdiQrNJbT72FCMKhU9MpyM55MRsKtj/zgPk z87u0WQAVZwL2jyuXma1UxHnMiGepCl2tZjM9/Mq6F/om7lusONYtUBiRIKh03hhDtPZvO Lk/JV6mqBd5ZUMrCNeF1qy2gOGQRIto= X-MC-Unique: RvUN02zXO6insRyru4BTZw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/10] qemuDomainDiskLookupByNodename: Look also for 'mirror' node names Date: Wed, 15 Jul 2020 15:10:10 +0200 Message-Id: <0add14d8f79ee4f9fccbc69852eb726877e7f24c.1594818495.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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 doing a block copy, there is another chain of images attached to a disk. Consider them as well when looking up a disk using nodename. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_domain.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ed7ec77ed4..18fd445e30 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11492,6 +11492,14 @@ qemuDomainDiskLookupByNodename(virDomainDefPtr def, return def->disks[i]; } + + if (def->disks[i]->mirror && + (tmp =3D virStorageSourceFindByNodeName(def->disks[i]->mirror,= nodename))) { + if (src) + *src =3D tmp; + + return def->disks[i]; + } } return NULL; --=20 2.26.2