mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu: propagate iotune settings to all disks in the group
Currently upon successfull call to qemu's implementation of virDomainSetBlockIoTune iotune settings are changed only for the disk given in API if the disk is in iotune group while we need to change the settings for all disks in the group. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
eb4455daab
commit
e7efffe6cb
@ -19117,6 +19117,26 @@ qemuDomainSetBlockIoTuneDefaults(virDomainBlockIoTuneInfoPtr newinfo,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuDomainSetGroupBlockIoTune(virDomainDefPtr def,
|
||||
virDomainBlockIoTuneInfoPtr iotune)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (!iotune->group_name)
|
||||
return;
|
||||
|
||||
for (i = 0; i < def->ndisks; i++) {
|
||||
virDomainDiskDefPtr d = def->disks[i];
|
||||
|
||||
if (STREQ_NULLABLE(d->blkdeviotune.group_name, iotune->group_name)) {
|
||||
VIR_FREE(d->blkdeviotune.group_name);
|
||||
virDomainBlockIoTuneInfoCopy(iotune, &d->blkdeviotune);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainSetBlockIoTune(virDomainPtr dom,
|
||||
const char *path,
|
||||
@ -19419,6 +19439,8 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
|
||||
if (virDomainDiskSetBlockIOTune(disk, &info) < 0)
|
||||
goto endjob;
|
||||
|
||||
qemuDomainSetGroupBlockIoTune(def, &info);
|
||||
|
||||
if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0)
|
||||
goto endjob;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user