qemu: blockjob: Use proper value when setting disk's READY state

Commit c412383796 used a value from wrong enum when setting the disk's
mirrorState variable. This meant that a 'READY' job would show up as
'PIVOTING'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
ACKed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Peter Krempa 2019-07-24 22:44:11 +02:00
parent 93b77cba0a
commit ed1c0aba34

View File

@ -723,7 +723,7 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
case QEMU_BLOCKJOB_STATE_READY:
if (job->disk && job->disk->mirror) {
job->disk->mirrorState = VIR_DOMAIN_BLOCK_JOB_READY;
job->disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_READY;
qemuBlockJobEmitEvents(driver, vm, job->disk, job->type, job->newstate);
}
job->state = job->newstate;