mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
conf: Rename 'virDomainDiskIothreadDef' to 'virDomainIothreadMappingDef'
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>
This commit is contained in:
parent
33ae851409
commit
4b651cf890
@ -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);
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user