[libvirt] [PATCH 06/10] qemu: blockjob: Mark job with broken data but tracked by qemu as reconnected

Cole Robinson crobinso at redhat.com
Tue Nov 26 20:41:20 UTC 2019


On 11/26/19 10:17 AM, Peter Krempa wrote:
> Otherwise it would get dropped later on as untracked despite us knowing
> about it. Additionally since we cancelled it we must wait to dismiss it
> which would not be possible if we unregister it. This also opened a
> window for a race condition since the job state change event of the
> just-cancelled job might be delivered prior to us unregistering the job
> in which case everything would work properly.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>  src/qemu/qemu_blockjob.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
> index b83d681f06..4d14c3d27c 100644
> --- a/src/qemu/qemu_blockjob.c
> +++ b/src/qemu/qemu_blockjob.c
> @@ -465,6 +465,8 @@ qemuBlockJobRefreshJobs(virQEMUDriverPtr driver,
> 
>              if (rc < 0)
>                  qemuBlockJobUnregister(job, vm);
> +            else
> +                job->reconnected = true;
>              continue;
>          }
> 

Reviewed-by: Cole Robinson <crobinso at redhat.com>

- Cole




More information about the libvir-list mailing list