mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Make qemuMonitorSetMigrationCompression saner
Checking whether the function has anything to do is better done in the function rather then requiring callers to do that. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
0966f0d7e0
commit
5a235947c2
@ -3455,8 +3455,7 @@ qemuMigrationSetCompression(virQEMUDriverPtr driver,
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, job) < 0)
|
||||
return -1;
|
||||
|
||||
if ((params->level_set || params->threads_set || params->dthreads_set) &&
|
||||
qemuMonitorSetMigrationCompression(priv->mon, params) < 0)
|
||||
if (qemuMonitorSetMigrationCompression(priv->mon, params) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (compression->xbzrle_cache_set &&
|
||||
|
@ -2177,6 +2177,11 @@ qemuMonitorSetMigrationCompression(qemuMonitorPtr mon,
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
|
||||
if (!compress->level_set &&
|
||||
!compress->threads_set &&
|
||||
!compress->dthreads_set)
|
||||
return 0;
|
||||
|
||||
return qemuMonitorJSONSetMigrationCompression(mon, compress);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user