mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemu: Allow virDomainBlockJobSetSpeed during migration
When a migration with non-shared storage is started with VIR_MIGRATE_PARAM_BANDWIDTH set, it will be applied to both memory migration and each block job started for storage migration. Once the migration is running virDomainMigrateSetMaxSpeed may be used to change the bandwidth used by memory migration, but there was no way of changing storage migration speed. Let's allow virDomainBlockJobSetSpeed during migration to enable the missing functionality. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d9fca42e40
commit
8b1578ab4b
@ -37,10 +37,13 @@ typedef enum {
|
||||
VIR_JOB_MODIFY, /* May change state */
|
||||
VIR_JOB_ABORT, /* Abort current async job */
|
||||
VIR_JOB_MIGRATION_OP, /* Operation influencing outgoing migration */
|
||||
VIR_JOB_MODIFY_MIGRATION_SAFE, /* Internal only job for event handlers which
|
||||
need to be processed even during migration.
|
||||
The code may only change state in a way
|
||||
that does not affect migration. */
|
||||
VIR_JOB_MODIFY_MIGRATION_SAFE, /* Modify job that is safe to be run during
|
||||
migration. The code may only change state
|
||||
in a way that does not affect migration.
|
||||
Used in event handlers which need to be
|
||||
processed even during migration or for
|
||||
setting block job speed when migrating
|
||||
with non-shared storage. */
|
||||
|
||||
/* The following two items must always be the last items before JOB_LAST */
|
||||
VIR_JOB_ASYNC, /* Asynchronous job */
|
||||
|
@ -13982,7 +13982,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
|
||||
if (virDomainBlockJobSetSpeedEnsureACL(dom->conn, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY_MIGRATION_SAFE) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainObjCheckActive(vm) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user