mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
qemu: Miscellaneous Block I/O tune cleanups
Well, just two. One indentation and the usage of 'ret'. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
e9d75343d4
commit
87ee705183
@ -17217,12 +17217,12 @@ qemuDomainSetBlockIoTuneDefaults(virDomainBlockIoTuneInfoPtr newinfo,
|
|||||||
newinfo->FIELD##_max_length = (newinfo->FIELD || \
|
newinfo->FIELD##_max_length = (newinfo->FIELD || \
|
||||||
newinfo->FIELD##_max) ? 1 : 0;
|
newinfo->FIELD##_max) ? 1 : 0;
|
||||||
|
|
||||||
SET_MAX_LENGTH(BYTES_MAX_LENGTH, total_bytes_sec);
|
SET_MAX_LENGTH(BYTES_MAX_LENGTH, total_bytes_sec);
|
||||||
SET_MAX_LENGTH(BYTES_MAX_LENGTH, read_bytes_sec);
|
SET_MAX_LENGTH(BYTES_MAX_LENGTH, read_bytes_sec);
|
||||||
SET_MAX_LENGTH(BYTES_MAX_LENGTH, write_bytes_sec);
|
SET_MAX_LENGTH(BYTES_MAX_LENGTH, write_bytes_sec);
|
||||||
SET_MAX_LENGTH(IOPS_MAX_LENGTH, total_iops_sec);
|
SET_MAX_LENGTH(IOPS_MAX_LENGTH, total_iops_sec);
|
||||||
SET_MAX_LENGTH(IOPS_MAX_LENGTH, read_iops_sec);
|
SET_MAX_LENGTH(IOPS_MAX_LENGTH, read_iops_sec);
|
||||||
SET_MAX_LENGTH(IOPS_MAX_LENGTH, write_iops_sec);
|
SET_MAX_LENGTH(IOPS_MAX_LENGTH, write_iops_sec);
|
||||||
|
|
||||||
#undef SET_MAX_LENGTH
|
#undef SET_MAX_LENGTH
|
||||||
|
|
||||||
@ -17512,11 +17512,12 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
ret = -1;
|
||||||
disk->blkdeviotune = info;
|
disk->blkdeviotune = info;
|
||||||
info.group_name = NULL;
|
info.group_name = NULL;
|
||||||
|
|
||||||
ret = virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps);
|
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir,
|
||||||
if (ret < 0)
|
vm, driver->caps) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
if (eventNparams) {
|
if (eventNparams) {
|
||||||
@ -17537,12 +17538,13 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
|
|||||||
set_fields);
|
set_fields);
|
||||||
conf_disk->blkdeviotune = info;
|
conf_disk->blkdeviotune = info;
|
||||||
info.group_name = NULL;
|
info.group_name = NULL;
|
||||||
ret = virDomainSaveConfig(cfg->configDir, driver->caps, persistentDef);
|
if (virDomainSaveConfig(cfg->configDir, driver->caps,
|
||||||
if (ret < 0)
|
persistentDef) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user