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@xxxxxxxxxx> --- 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) 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, @@ -23240,7 +23240,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); 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, 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 */ 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 = 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; 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 *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); 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(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 */ 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 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; @@ -2827,7 +2827,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; -- 2.48.1