From nobody Mon Feb 9 07:44:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1595410926; cv=none; d=zohomail.com; s=zohoarc; b=AvyxCZMxJy5cl5YugoYqpfXNja9xaXcItZm7x2imSbG2D3DO6tB7EjekEaQAoz02iFA6s5bwJrvChmSeQd+PTed17+KOdDtJxifBNP7q5v+cE6jeTGEAr549y+4zZ9T6BQGWEMSx4Jy2ioEn2NUbyF5tQJhrNjWen8RjY3cJtWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595410926; 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=yhbFLmfxLDoHX5gTgo/jxjoSya602JXZlUyRPUA8yEA=; b=KgpzL3DNPYaG5aqmRfkY1VUm6FA6r85V64SWbJd5BlqS/8B6wtS140pNjbJENlw79SQy8xIfJaXukwQ88M/VwBbXgbeAOz+en+7feQuPJlsLZEMshDyqX8DNmTFRL5TOFcfmW0/DnfchMh1fpYgN+SKSMssHQJUSkJneZzHxda8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1595410926527708.0657515555796; Wed, 22 Jul 2020 02:42:06 -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-470-cQ4vKA0ZPwyEtybB-N0TDg-1; Wed, 22 Jul 2020 05:41:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 39608801A03; Wed, 22 Jul 2020 09:41:03 +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 19B895C1C3; Wed, 22 Jul 2020 09:41:03 +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 DAFAC1800FDD; Wed, 22 Jul 2020 09:41:02 +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 06M9evYF000958 for ; Wed, 22 Jul 2020 05:40:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2F2F62DE6B; Wed, 22 Jul 2020 09:40:57 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id A24871A8F7 for ; Wed, 22 Jul 2020 09:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595410925; 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=yhbFLmfxLDoHX5gTgo/jxjoSya602JXZlUyRPUA8yEA=; b=ZLv+v1U7njxZxEYHvPfiUgxXO9sk5pGqo7+VdXMasaMxcprhsaYzKU4+Y+h39fTUpZtiIY qCANzCBoieF8lpRNv3VbUtxxeJFdiw7+j4d094c+ivhV/jdMnJWFnQznyVk+IeR8Tc74zN zAL4jcTPYEbHXTcb7sPah84qyqlr2C4= X-MC-Unique: cQ4vKA0ZPwyEtybB-N0TDg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 14/34] qemuDomainSetupDisk: Accept @src Date: Wed, 22 Jul 2020 11:40:08 +0200 Message-Id: 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 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.16 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" The aim to make it look as close to qemuDomainNamespaceSetupDisk() as possible. The latter will call the former and this change makes that diff easier to read. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain_namespace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namesp= ace.c index 1803943fbc..18ec86816c 100644 --- a/src/qemu/qemu_domain_namespace.c +++ b/src/qemu/qemu_domain_namespace.c @@ -486,13 +486,13 @@ qemuDomainSetupDev(virQEMUDriverConfigPtr cfg, =20 =20 static int -qemuDomainSetupDisk(virDomainDiskDefPtr disk, +qemuDomainSetupDisk(virStorageSourcePtr src, const struct qemuDomainCreateDeviceData *data) { virStorageSourcePtr next; bool hasNVMe =3D false; =20 - for (next =3D disk->src; virStorageSourceIsBacking(next); next =3D nex= t->backingStore) { + for (next =3D src; virStorageSourceIsBacking(next); next =3D next->bac= kingStore) { VIR_AUTOSTRINGLIST targetPaths =3D NULL; size_t i; =20 @@ -531,7 +531,7 @@ qemuDomainSetupDisk(virDomainDiskDefPtr disk, } =20 /* qemu-pr-helper might require access to /dev/mapper/control. */ - if (disk->src->pr && + if (src->pr && qemuDomainCreateDevice(QEMU_DEVICE_MAPPER_CONTROL_PATH, data, true= ) < 0) return -1; =20 @@ -551,7 +551,7 @@ qemuDomainSetupAllDisks(virDomainObjPtr vm, VIR_DEBUG("Setting up disks"); =20 for (i =3D 0; i < vm->def->ndisks; i++) { - if (qemuDomainSetupDisk(vm->def->disks[i], + if (qemuDomainSetupDisk(vm->def->disks[i]->src, data) < 0) return -1; } --=20 2.26.2