]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Rename 'virDomainDiskIothreadDef' to 'virDomainIothreadMappingDef'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 11 Feb 2025 16:59:57 +0000 (17:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Feb 2025 14:21:44 +0000 (15:21 +0100)
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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/hypervisor/domain_driver.c
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_validate.c

index 7db4368b2a88e06a36b5b8c8a1f5a8bf7fb270c4..c1ffa117ea415807b63a1136f4e247ee1f82ce27 100644 (file)
@@ -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) virDomainDiskIothreadDefFree);
+    g_slist_free_full(def->iothreads, (GDestroyNotify) virDomainIothreadMappingDefFree);
 
     g_free(def);
 }
@@ -7991,7 +7991,7 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def,
         return -1;
 
     if ((iothreadsNode = virXMLNodeGetSubelement(cur, "iothreads"))) {
-        g_autoslist(virDomainDiskIothreadDef) ioth = NULL;
+        g_autoslist(virDomainIothreadMappingDef) ioth = NULL;
         g_autoptr(GPtrArray) iothreadNodes = NULL;
 
         if ((iothreadNodes = virXMLNodeGetSubelementList(iothreadsNode, "iothread"))) {
@@ -7999,7 +7999,7 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def,
 
             for (i = 0; i < iothreadNodes->len; i++) {
                 xmlNodePtr iothNode = g_ptr_array_index(iothreadNodes, i);
-                g_autoptr(virDomainDiskIothreadDef) iothdef = g_new0(virDomainDiskIothreadDef, 1);
+                g_autoptr(virDomainIothreadMappingDef) iothdef = g_new0(virDomainIothreadMappingDef, 1);
                 g_autoptr(GPtrArray) queueNodes = NULL;
 
                 if (virXMLPropUInt(iothNode, "id", 10, VIR_XML_PROP_REQUIRED,
@@ -23231,7 +23231,7 @@ virDomainDiskDefFormatDriver(virBuffer *buf,
         GSList *n;
 
         for (n = disk->iothreads; n; n = n->next) {
-            virDomainDiskIothreadDef *iothDef = n->data;
+            virDomainIothreadMappingDef *iothDef = n->data;
             g_auto(virBuffer) iothreadAttrBuf = VIR_BUFFER_INITIALIZER;
             g_auto(virBuffer) iothreadChildBuf = VIR_BUFFER_INIT_CHILD(&iothreadsChildBuf);
 
index 9da6586e669ba71548c28ee85737943f2d7fe57c..d4fa79cb84ad24f7dd5beb10b2921c9bc0c19a41 100644 (file)
@@ -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, virDomainDiskIothreadDefFree);
+typedef struct _virDomainIothreadMappingDef virDomainIothreadMappingDef;
+void virDomainIothreadMappingDefFree(virDomainIothreadMappingDef *def);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainIothreadMappingDef, virDomainIothreadMappingDefFree);
 
 
 /* Stores the virtual disk configuration */
@@ -574,7 +574,7 @@ struct _virDomainDiskDef {
     virDomainDeviceSGIO sgio;
     virDomainDiskDiscard discard;
     unsigned int iothread; /* unused = 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 */
index bea84cd09d27e9a558c0bb73e51680b1921389f5..9fbfec9f04c0d32a85826da1b96a9b4aa1ee0639 100644 (file)
@@ -562,7 +562,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def,
         bool inuse = false;
 
         for (n = def->disks[i]->iothreads; n; n = n->next) {
-            virDomainDiskIothreadDef *iothread = n->data;
+            virDomainIothreadMappingDef *iothread = n->data;
 
             if (iothread->id == iothread_id) {
                 inuse = true;
index d898e548e1874b9cecc4090d9b78acb5e895363f..0d1890ef379ead30a5ffe52c12f37ccd069cbe2e 100644 (file)
@@ -1580,7 +1580,7 @@ qemuBuildDiskDeviceIothreadMappingProps(GSList *iothreads)
     GSList *n;
 
     for (n = iothreads; n; n = n->next) {
-        virDomainDiskIothreadDef *ioth = n->data;
+        virDomainIothreadMappingDef *ioth = n->data;
         g_autoptr(virJSONValue) props = NULL;
         g_autoptr(virJSONValue) queues = NULL;
         g_autofree char *alias = g_strdup_printf("iothread%u", ioth->id);
index a9bcd621233440a2a6c8426b7fbdcf8e7de051c9..8be218115601bd3bc709b7d23d8f8cda4f16f5ce 100644 (file)
@@ -6644,8 +6644,8 @@ qemuDomainDiskChangeSupportedIothreads(virDomainDiskDef *disk,
     GSList *new = 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 */
index 3e3e368da30d599e61df914e692468f98eeb22a0..9059c2639a82b4f1790d0eb2e70e6b3f2312db97 100644 (file)
@@ -2830,7 +2830,7 @@ qemuValidateDomainDeviceDefDiskIOThreads(const virDomainDef *def,
     }
 
     if (disk->iothreads) {
-        virDomainDiskIothreadDef *first_ioth = disk->iothreads->data;
+        virDomainIothreadMappingDef *first_ioth = disk->iothreads->data;
         g_autoptr(virBitmap) queueMap = NULL;
         g_autoptr(GHashTable) iothreads = virHashNew(NULL);
         ssize_t unused;
@@ -2856,7 +2856,7 @@ qemuValidateDomainDeviceDefDiskIOThreads(const virDomainDef *def,
          *    - queue must be assigned only once
          */
         for (n = disk->iothreads; n; n = n->next) {
-            virDomainDiskIothreadDef *ioth = n->data;
+            virDomainIothreadMappingDef *ioth = n->data;
             g_autofree char *alias = g_strdup_printf("iothread%u", ioth->id);
             size_t i;