From nobody Mon Feb 9 16:45:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1697468649; cv=none; d=zohomail.com; s=zohoarc; b=ShiC0uz/o5jsyF97u+6eEUZ9QcWEUDShr5wBzPeZ7fdPSD9synacA9ee6RO4o+2zGYzgTbmjC2BLbkX7+i68MQPVH7mfVIlkJ3VYQEg1lfH0Ctg18Q7umnKkVsCzVLcLW/HmmzXJ4bMz0DqmL3h22GpHhhVfoIY8oQ+0g/jLNtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697468649; 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=vg2aO7MuDfWQzNrrIktsJGk2hlZ/LyOApi7LV2uWoP4=; b=EgKkGWEUuEbiMMhABR2MgLNdW3qGBtSwLsIquFf+bZ3dZypGw4xxMR4O54y9v++4f+rQNtsXKR6e3OIKSxMLfFqMPjEwj+LbPyJzbWkW4YnRcUu7gJyk4mJEBomOWPcryc119kj36SgBFpDmmsaJJo/jXdn2kuzSZwP3Ri2ujjo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1697468649186156.36229548455412; Mon, 16 Oct 2023 08:04:09 -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-114-8vxrfvL3PoCrwa7mbdIITQ-1; Mon, 16 Oct 2023 11:02:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 235AB81D9E1; Mon, 16 Oct 2023 15:02:22 +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 0AD2A25C8; Mon, 16 Oct 2023 15:02:22 +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 E22181946588; Mon, 16 Oct 2023 15:02:21 +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 112161946587 for ; Mon, 16 Oct 2023 15:02:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0624B40C6F79; Mon, 16 Oct 2023 15:02:21 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5319840C6CA3 for ; Mon, 16 Oct 2023 15:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697468648; 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=vg2aO7MuDfWQzNrrIktsJGk2hlZ/LyOApi7LV2uWoP4=; b=OxXtfx5GNicX/W2a9+oECVoaouZf2wtdGsvte2uAI3uq46t8JeGzSKDYWCQ860/8I2PO5T ZG6JzBVz9+4XjQ2BtTbEzzVzXp/deWJBKEEFwss3w1/dIdDw7XSqIf7tMj0GS36JfYdl/R X6ET/RhTRk88KoxcN3uJYzX/zgx+TcY= X-MC-Unique: 8vxrfvL3PoCrwa7mbdIITQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 21/31] qemu: block: Use 'format' nodename accessors in '-blockdev' setup code Date: Mon, 16 Oct 2023 17:01:48 +0200 Message-ID: <86a3e0f99c2e7b4dce4ce78849a5ce2399efe551.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.4.1 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: 1697468650724100012 Content-Type: text/plain; charset="utf-8" Convert the main -blockdev JSON object setup code to use the new accessors. In these we use mainly the real 'format' layer node name. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 0fa5b6e55d..852028f014 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1282,7 +1282,7 @@ qemuBlockStorageSourceGetBlockdevFormatCommonProps(vi= rStorageSource *src) src->detect_ze= roes); g_autoptr(virJSONValue) props =3D NULL; - if (qemuBlockNodeNameValidate(src->nodeformat) < 0) + if (qemuBlockNodeNameValidate(qemuBlockStorageSourceGetFormatNodename(= src)) < 0) return NULL; if (src->discard) @@ -1296,7 +1296,7 @@ qemuBlockStorageSourceGetBlockdevFormatCommonProps(vi= rStorageSource *src) */ if (virJSONValueObjectAdd(&props, - "s:node-name", src->nodeformat, + "s:node-name", qemuBlockStorageSourceGetForm= atNodename(src), "b:read-only", src->readonly, "S:discard", discard, "S:detect-zeroes", detectZeroes, @@ -1530,7 +1530,7 @@ qemuBlockStorageSourceAttachPrepareBlockdev(virStorag= eSource *src, return NULL; data->storageNodeName =3D qemuBlockStorageSourceGetStorageNodename(src= ); - data->formatNodeName =3D src->nodeformat; + data->formatNodeName =3D qemuBlockStorageSourceGetFormatNodename(src); if (qemuBlockStorageSourceNeedsStorageSliceLayer(src)) { if (!(data->storageSliceProps =3D qemuBlockStorageSourceGetBlockde= vStorageSliceProps(src))) @@ -1748,7 +1748,7 @@ qemuBlockStorageSourceDetachPrepare(virStorageSource = *src) data =3D g_new0(qemuBlockStorageSourceAttachData, 1); - data->formatNodeName =3D src->nodeformat; + data->formatNodeName =3D qemuBlockStorageSourceGetFormatNodename(src); data->formatAttached =3D true; data->storageNodeName =3D qemuBlockStorageSourceGetStorageNodename(src= ); data->storageAttached =3D true; @@ -1941,7 +1941,8 @@ qemuBlockStorageSourceDetachOneBlockdev(virDomainObj = *vm, if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0) return -1; - ret =3D qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), src->nodeform= at); + ret =3D qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), + qemuBlockStorageSourceGetFormatNodename(s= rc)); if (ret =3D=3D 0) ret =3D qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), @@ -1959,8 +1960,8 @@ qemuBlockSnapshotAddBlockdev(virJSONValue *actions, virStorageSource *newsrc) { return qemuMonitorTransactionSnapshotBlockdev(actions, - disk->src->nodeformat, - newsrc->nodeformat); + qemuBlockStorageSourceGe= tEffectiveNodename(disk->src), + qemuBlockStorageSourceGe= tFormatNodename(newsrc)); } --=20 2.41.0