From nobody Mon Feb 9 01:31:03 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=1697468553; cv=none; d=zohomail.com; s=zohoarc; b=a2CGxzptpHJFWIhq7/3iAnsM2R9b8aqx+I/P4aqLcBBPi4LEb2CFXHlMUeCqWBpg7wd9rKgaiHamMi5hiZZwSpoiGwPKp0PRQHB7yXCBeo5jqD/vsYRRGDsrWtqvMHoTR8YzlKOhOVxGLwj0p14UJysElSdLNWM6MexE8OK0TtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697468553; 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=VmYJ/awyWvno/nls//GXOw+aGWOMdLCDsGlAXlxjvUc=; b=Gbh5HxL0Qzu7VUvCIhRvIQvPCYbRIRlQkn5N9+NFfmKnOQImTZPMu6m/f48HBeWvJO59As7S1mEVzhITMOtJO52LWhYlOy/+JMUbeSXh5H+QOsj4CqffZGTU7elMLCdwLJapqA1KHsNQngMOoJDETFPqEhR/t92MZtRvAzwxPAk= 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 1697468553362604.7081002924238; Mon, 16 Oct 2023 08:02:33 -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-610-2ZhTwROYNJ6w34Azvs62uA-1; Mon, 16 Oct 2023 11:02:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 D86268E8C8B; Mon, 16 Oct 2023 15:02:04 +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 C4BEC10B7C8E; Mon, 16 Oct 2023 15:02:04 +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 6813019465BC; Mon, 16 Oct 2023 15:02:04 +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 7DF4F1946588 for ; Mon, 16 Oct 2023 15:02:03 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6F32F40C6CA3; Mon, 16 Oct 2023 15:02:03 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E02A240C6F79 for ; Mon, 16 Oct 2023 15:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697468552; 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=VmYJ/awyWvno/nls//GXOw+aGWOMdLCDsGlAXlxjvUc=; b=W8VKrnIwJ7Jt2rtpQe86dtjFOW2FA2f/QPLdi3+0TFc/jIUDJRkIvN7lXOKHjV0ubQ8eHw KDyP07EkiWkbhoZmfbhudRkOaLwc+Zrw6m5LoJdXGgch/2JqhXJgE0Xnaek/kkMTwK3oSZ vOAVM6f0NtPT8oDJaadondw8lbb4i70= X-MC-Unique: 2ZhTwROYNJ6w34Azvs62uA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/31] qemu: block: Rename qemuBlockStorageSourceGetBlockdevProps Date: Mon, 16 Oct 2023 17:01:30 +0200 Message-ID: <58a50392319ea368fba4685d72cc0adbde852f69.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.3 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: 1697468553963100001 Content-Type: text/plain; charset="utf-8" Use qemuBlockStorageSourceGetFormatProps as it formats the properties of the 'format' driver in qemu. Adjust the comment which was hinting otherwise. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 16 +++++++--------- src/qemu/qemu_block.h | 4 ++-- tests/qemublocktest.c | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 9b6d901e8c..07bc8ede76 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1295,18 +1295,17 @@ qemuBlockStorageSourceGetBlockdevFormatProps(virSto= rageSource *src) /** - * qemuBlockStorageSourceGetBlockdevProps: + * qemuBlockStorageSourceGetFormatProps: * * @src: storage source to format * @backingStore: a storage source to use as backing of @src * - * Formats @src into a JSON object which can be used with blockdev-add or - * -blockdev. The formatted object contains both the storage and format la= yer - * in nested form including link to the backing chain layer if necessary. + * Formats properties of @src related to the format blockdev driver in qemu + * into a JSON object which can be used with blockdev-add or -blockdev. */ virJSONValue * -qemuBlockStorageSourceGetBlockdevProps(virStorageSource *src, - virStorageSource *backingStore) +qemuBlockStorageSourceGetFormatProps(virStorageSource *src, + virStorageSource *backingStore) { g_autoptr(virJSONValue) props =3D NULL; const char *backingFormatterStr =3D NULL; @@ -1434,8 +1433,7 @@ qemuBlockStorageSourceAttachPrepareBlockdev(virStorag= eSource *src, data =3D g_new0(qemuBlockStorageSourceAttachData, 1); - if (!(data->formatProps =3D qemuBlockStorageSourceGetBlockdevProps(src, - backi= ngStore)) || + if (!(data->formatProps =3D qemuBlockStorageSourceGetFormatProps(src, = backingStore)) || !(data->storageProps =3D qemuBlockStorageSourceGetBackendProps(src, backe= ndpropsflags))) return NULL; @@ -3049,7 +3047,7 @@ qemuBlockReopenFormatMon(qemuMonitor *mon, g_autoptr(virJSONValue) srcprops =3D NULL; g_autoptr(virJSONValue) reopenoptions =3D virJSONValueNewArray(); - if (!(srcprops =3D qemuBlockStorageSourceGetBlockdevProps(src, src->ba= ckingStore))) + if (!(srcprops =3D qemuBlockStorageSourceGetFormatProps(src, src->back= ingStore))) return -1; if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0) diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index 530d88d28e..cf5eaf87f3 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -57,8 +57,8 @@ virURI * qemuBlockStorageSourceGetURI(virStorageSource *src); virJSONValue * -qemuBlockStorageSourceGetBlockdevProps(virStorageSource *src, - virStorageSource *backingStore); +qemuBlockStorageSourceGetFormatProps(virStorageSource *src, + virStorageSource *backingStore); virJSONValue * qemuBlockStorageGetCopyOnReadProps(virDomainDiskDef *disk); diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 8bad69e7ac..edfe7719c8 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -301,7 +301,7 @@ testQemuDiskXMLToProps(const void *opaque) qemuDomainPrepareDiskSourceData(disk, n); - if (!(formatProps =3D qemuBlockStorageSourceGetBlockdevProps(n, n-= >backingStore)) || + if (!(formatProps =3D qemuBlockStorageSourceGetFormatProps(n, n->b= ackingStore)) || !(storageSrcOnlyProps =3D qemuBlockStorageSourceGetBackendProp= s(n, backendpropsflagstarget)) || !(storageProps =3D qemuBlockStorageSourceGetBackendProps(n, ba= ckendpropsflagsnormal)) || !(backingstore =3D qemuBlockGetBackingStoreString(n, true))) { --=20 2.41.0