mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu: blockjob: Mark job as started only when it's new
Switching a block job to some states (e.g. QEMU_BLOCKJOB_STATE_READY) might not require a job, thus if it will become ready asynchronously we should not overwrite the state any more. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
8d5df64449
commit
c6db273082
@ -149,7 +149,8 @@ qemuBlockJobDiskGetJob(virDomainDiskDefPtr disk)
|
||||
void
|
||||
qemuBlockJobStarted(qemuBlockJobDataPtr job)
|
||||
{
|
||||
job->state = QEMU_BLOCKJOB_STATE_RUNNING;
|
||||
if (job->state == QEMU_BLOCKJOB_STATE_NEW)
|
||||
job->state = QEMU_BLOCKJOB_STATE_RUNNING;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user