From nobody Tue Dec 16 13:49:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 173955065780894.11384145128454; Fri, 14 Feb 2025 08:30:57 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id BE1861BAE; Fri, 14 Feb 2025 11:30:56 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 32E6A1BA7; Fri, 14 Feb 2025 11:29:59 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 7591B1969; Fri, 14 Feb 2025 11:29:55 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DD3D915CA for ; Fri, 14 Feb 2025 11:29:54 -0500 (EST) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-127-jdHtylaGOc67LqPZ1L7fwA-1; Fri, 14 Feb 2025 11:29:53 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F9271903051 for ; Fri, 14 Feb 2025 16:29:52 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.26]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D9221955DCE; Fri, 14 Feb 2025 16:29:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739550594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xc8DqPsrh7QYUSibiK7rI84/zs9RKk8idXp648md8cw=; b=RbhR/xZ6G1CPj82Th8pzSg2D4PEDpwrLpenRCdDMTmeMhKqk0rF0UYQae/4Q/nXE0P0dug nN/SQeXSyqKUnQeBnVkkfCF/joPZYg5ckPA07AjaCBt8uwUMrfSiMDwq1rDkVjRK4H8D78 e3mE//7qcyMu2bWNJl8+QRzKKKzo4TE= X-MC-Unique: jdHtylaGOc67LqPZ1L7fwA-1 X-Mimecast-MFC-AGG-ID: jdHtylaGOc67LqPZ1L7fwA_1739550592 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 01/13] conf: Rename 'virDomainDiskIothreadDef' to 'virDomainIothreadMappingDef' Date: Fri, 14 Feb 2025 17:29:35 +0100 Message-ID: <8c843082bbd2462d9828f7a5bbdd1fc26fc772c6.1739550300.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: HGKUFdb60yGgwqUYY4MFViBGx2ToK7OVnuYIPOOEz-s_1739550592 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JOMTCJ462BRQ2HG52LL5LYD6DVRFUW75 X-Message-ID-Hash: JOMTCJ462BRQ2HG52LL5LYD6DVRFUW75 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Stefan Hajnoczi X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1739550659980019100 Content-Type: text/plain; charset="utf-8" The iothread mapping will be also possible for 'virtio-scsi' controllers so rename the corresponding structs to a generic name. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 10 +++++----- src/conf/domain_conf.h | 10 +++++----- src/hypervisor/domain_driver.c | 2 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_domain.c | 4 ++-- src/qemu/qemu_validate.c | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 87f87bbe56..22b9dad9ee 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2368,7 +2368,7 @@ virDomainDefGetVcpusTopology(const virDomainDef *def, void -virDomainDiskIothreadDefFree(virDomainDiskIothreadDef *def) +virDomainIothreadMappingDefFree(virDomainIothreadMappingDef *def) { if (!def) return; @@ -2426,7 +2426,7 @@ virDomainDiskDefFree(virDomainDiskDef *def) g_free(def->virtio); virDomainDeviceInfoClear(&def->info); virObjectUnref(def->privateData); - g_slist_free_full(def->iothreads, (GDestroyNotify) virDomainDiskIothre= adDefFree); + g_slist_free_full(def->iothreads, (GDestroyNotify) virDomainIothreadMa= ppingDefFree); g_free(def); } @@ -7991,7 +7991,7 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def, return -1; if ((iothreadsNode =3D virXMLNodeGetSubelement(cur, "iothreads"))) { - g_autoslist(virDomainDiskIothreadDef) ioth =3D NULL; + g_autoslist(virDomainIothreadMappingDef) ioth =3D NULL; g_autoptr(GPtrArray) iothreadNodes =3D NULL; if ((iothreadNodes =3D virXMLNodeGetSubelementList(iothreadsNode, = "iothread"))) { @@ -7999,7 +7999,7 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def, for (i =3D 0; i < iothreadNodes->len; i++) { xmlNodePtr iothNode =3D g_ptr_array_index(iothreadNodes, i= ); - g_autoptr(virDomainDiskIothreadDef) iothdef =3D g_new0(vir= DomainDiskIothreadDef, 1); + g_autoptr(virDomainIothreadMappingDef) iothdef =3D g_new0(= virDomainIothreadMappingDef, 1); g_autoptr(GPtrArray) queueNodes =3D NULL; if (virXMLPropUInt(iothNode, "id", 10, VIR_XML_PROP_REQUIR= ED, @@ -23240,7 +23240,7 @@ virDomainDiskDefFormatDriver(virBuffer *buf, GSList *n; for (n =3D disk->iothreads; n; n =3D n->next) { - virDomainDiskIothreadDef *iothDef =3D n->data; + virDomainIothreadMappingDef *iothDef =3D n->data; g_auto(virBuffer) iothreadAttrBuf =3D VIR_BUFFER_INITIALIZER; g_auto(virBuffer) iothreadChildBuf =3D VIR_BUFFER_INIT_CHILD(&= iothreadsChildBuf); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e51c74b6d1..10dd5497ac 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -507,7 +507,7 @@ typedef enum { VIR_ENUM_DECL(virDomainSnapshotLocation); -struct _virDomainDiskIothreadDef { +struct _virDomainIothreadMappingDef { unsigned int id; /* optional list of virtqueues the iothread should handle */ @@ -515,9 +515,9 @@ struct _virDomainDiskIothreadDef { size_t nqueues; }; -typedef struct _virDomainDiskIothreadDef virDomainDiskIothreadDef; -void virDomainDiskIothreadDefFree(virDomainDiskIothreadDef *def); -G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainDiskIothreadDef, virDomainDiskIothr= eadDefFree); +typedef struct _virDomainIothreadMappingDef virDomainIothreadMappingDef; +void virDomainIothreadMappingDefFree(virDomainIothreadMappingDef *def); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainIothreadMappingDef, virDomainIothre= adMappingDefFree); /* Stores the virtual disk configuration */ @@ -574,7 +574,7 @@ struct _virDomainDiskDef { virDomainDeviceSGIO sgio; virDomainDiskDiscard discard; unsigned int iothread; /* unused =3D 0, > 0 specific thread # */ - GSList *iothreads; /* List of virDomainDiskIothreadsDef */ + GSList *iothreads; /* List of virDomainIothreadMappingDef */ virDomainDiskDetectZeroes detect_zeroes; virTristateSwitch discard_no_unref; char *domain_name; /* backend domain name */ diff --git a/src/hypervisor/domain_driver.c b/src/hypervisor/domain_driver.c index bea84cd09d..9fbfec9f04 100644 --- a/src/hypervisor/domain_driver.c +++ b/src/hypervisor/domain_driver.c @@ -562,7 +562,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, bool inuse =3D false; for (n =3D def->disks[i]->iothreads; n; n =3D n->next) { - virDomainDiskIothreadDef *iothread =3D n->data; + virDomainIothreadMappingDef *iothread =3D n->data; if (iothread->id =3D=3D iothread_id) { inuse =3D true; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7370711918..35a71b73a7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1580,7 +1580,7 @@ qemuBuildDiskDeviceIothreadMappingProps(GSList *iothr= eads) GSList *n; for (n =3D iothreads; n; n =3D n->next) { - virDomainDiskIothreadDef *ioth =3D n->data; + virDomainIothreadMappingDef *ioth =3D n->data; g_autoptr(virJSONValue) props =3D NULL; g_autoptr(virJSONValue) queues =3D NULL; g_autofree char *alias =3D g_strdup_printf("iothread%u", ioth->id); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index cf05dca55a..7ede1a5a6e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6646,8 +6646,8 @@ qemuDomainDiskChangeSupportedIothreads(virDomainDiskD= ef *disk, GSList *new =3D disk->iothreads; while (true) { - virDomainDiskIothreadDef *old_def; - virDomainDiskIothreadDef *new_def; + virDomainIothreadMappingDef *old_def; + virDomainIothreadMappingDef *new_def; size_t i; /* match - both empty or both at the end */ diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 76f2eafe49..fb4c9bf552 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -2801,7 +2801,7 @@ qemuValidateDomainDeviceDefDiskIOThreads(const virDom= ainDef *def, } if (disk->iothreads) { - virDomainDiskIothreadDef *first_ioth =3D disk->iothreads->data; + virDomainIothreadMappingDef *first_ioth =3D disk->iothreads->data; g_autoptr(virBitmap) queueMap =3D NULL; g_autoptr(GHashTable) iothreads =3D virHashNew(NULL); ssize_t unused; @@ -2827,7 +2827,7 @@ qemuValidateDomainDeviceDefDiskIOThreads(const virDom= ainDef *def, * - queue must be assigned only once */ for (n =3D disk->iothreads; n; n =3D n->next) { - virDomainDiskIothreadDef *ioth =3D n->data; + virDomainIothreadMappingDef *ioth =3D n->data; g_autofree char *alias =3D g_strdup_printf("iothread%u", ioth-= >id); size_t i; --=20 2.48.1