From nobody Mon Feb 9 01:21:50 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=1697468770; cv=none; d=zohomail.com; s=zohoarc; b=ChTA/5yoS1GlVjU8sZ5f3wyx2zkQyEqVlDYXn0Io3SZTR4l8iM3lxjso5vU1eMCYPLYL/CTAeji9wWbV4tB8AjsQXahQZWCqlIFEOZDqGP6qd0pYAKvyq21JXGYWRsrl+0KG1rc5/ilUQ6fUOwOM854LUb0Z9M+bWEXWwEN9/30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697468770; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=U90+5mQjVT/Be/GykvMhN88pJC8zcy/9VXD+qdMlvBY=; b=WTKIDaHYqrh9YZ7vOk7Fe2hneBmfCQstqjy3aT4oHkoZD2aYn5u1BFT1bw2qEiHpVfrHWc0i/xYgcktOK2wMEf6FSLrIduOHN2OFZ+Izvx6I7bXOCMxPrxI6AeR+C4Vppk8resVybh7T9S9B5B7Z/Eq6Q0T9Bb1zGr0lUvnywpg= 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 1697468770729365.60844816024417; Mon, 16 Oct 2023 08:06:10 -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-614-IS9p5B2YPcW7kziqHWw33A-1; Mon, 16 Oct 2023 11:02:27 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 181BC1875056; Mon, 16 Oct 2023 15:02:08 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB3BE63F51; Mon, 16 Oct 2023 15:02:07 +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 A15B21946588; Mon, 16 Oct 2023 15:02:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 150DF1946587 for ; Mon, 16 Oct 2023 15:02:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0353A40C6F7F; Mon, 16 Oct 2023 15:02:07 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 677C440C6F79 for ; Mon, 16 Oct 2023 15:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697468769; 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=U90+5mQjVT/Be/GykvMhN88pJC8zcy/9VXD+qdMlvBY=; b=fOAVAhMecqwv7cAY1tSg9ToSNdwxHTI/KA3NlFTJ6HCGu8FTRV/J51ug+IEvUsAO5Ix8CA A8NW+Lr0yrKZQZ4fHXOfOIRlJ5QEZH0dJAM8zPaFlgOGrv3U9WSfJbdI3GLcyj25h8YIQl d/fLnCJ10byKMPOVhgHSUT37bSYpzf4= X-MC-Unique: IS9p5B2YPcW7kziqHWw33A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/31] qemu: block: Use proper accessors for image formatting/creation code Date: Mon, 16 Oct 2023 17:01:34 +0200 Message-ID: <007514c9cd1c8f2ca3008c00ec652a6fd874ca71.1697468414.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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 3.1 on 10.11.54.5 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: 1697468771582100001 Content-Type: text/plain; charset="utf-8" Use 'qemuBlockStorageSourceGetEffectiveStorageNodename' in all the JSON props formatters for setting up a 'blockdev-create' job of a format layer. In case of the blockjob name designator we're okay to use just the storage layer nodename as that serves only to find the appropriate entry. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 10 +++++----- src/qemu/qemu_blockjob.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 0c9460f678..a98caa330e 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -2078,7 +2078,7 @@ qemuBlockStorageSourceCreateGetFormatPropsGeneric(vir= StorageSource *src, if (virJSONValueObjectAdd(&props, "s:driver", driver, - "s:file", src->nodestorage, + "s:file", qemuBlockStorageSourceGetEffective= StorageNodename(src), "U:size", src->capacity, NULL) < 0) return -1; @@ -2143,7 +2143,7 @@ qemuBlockStorageSourceCreateGetFormatPropsLUKS(virSto= rageSource *src, if (virJSONValueObjectAdd(&luksprops, "s:driver", "luks", - "s:file", src->nodestorage, + "s:file", qemuBlockStorageSourceGetEffective= StorageNodename(src), "U:size", src->capacity, NULL) < 0) return -1; @@ -2200,7 +2200,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow2(virSt= orageSource *src, if (virJSONValueObjectAdd(&qcow2props, "s:driver", "qcow2", - "s:file", src->nodestorage, + "s:file", qemuBlockStorageSourceGetEffective= StorageNodename(src), "U:size", src->capacity, "S:version", qcow2version, "P:cluster-size", src->clusterSize, @@ -2226,7 +2226,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow(virSto= rageSource *src, if (virJSONValueObjectAdd(&qcowprops, "s:driver", "qcow", - "s:file", src->nodestorage, + "s:file", qemuBlockStorageSourceGetEffective= StorageNodename(src), "U:size", src->capacity, NULL) < 0) return -1; @@ -2249,7 +2249,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQed(virStor= ageSource *src, if (virJSONValueObjectAdd(&qedprops, "s:driver", "qed", - "s:file", src->nodestorage, + "s:file", qemuBlockStorageSourceGetEffective= StorageNodename(src), "U:size", src->capacity, NULL) < 0) return -1; diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index f1d22df59f..25ac74d6c4 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -312,7 +312,7 @@ qemuBlockJobNewCreate(virDomainObj *vm, const char *nodename =3D src->nodeformat; if (storage) - nodename =3D src->nodestorage; + nodename =3D qemuBlockStorageSourceGetStorageNodename(src); jobname =3D g_strdup_printf("create-%s", nodename); --=20 2.41.0