void
-virDomainDiskIothreadDefFree(virDomainDiskIothreadDef *def)
+virDomainIothreadMappingDefFree(virDomainIothreadMappingDef *def)
{
if (!def)
return;
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);
}
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"))) {
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,
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);
VIR_ENUM_DECL(virDomainSnapshotLocation);
-struct _virDomainDiskIothreadDef {
+struct _virDomainIothreadMappingDef {
unsigned int id;
/* optional list of virtqueues the iothread should handle */
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 */
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 */
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;
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);
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 */
}
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;
* - 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;