Am 26.09.2012 17:56, schrieb Paolo Bonzini:
> Switching to the target of the migration is done mostly asynchronously,
> and reported to management via the BLOCK_JOB_COMPLETED event; the only
> synchronous phase is opening the backing files.  bdrv_open_backing_file
> can always be done, even for migration of the full image (aka sync:
> 'full').  In this case, qmp_drive_mirror will create the target disk
> with no backing file at all, and bdrv_open_backing_file will be a no-op.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  block/mirror.c | 41 ++++++++++++++++++++++++++++++++++++-----
>  1 file modificato, 36 inserzioni(+), 5 rimozioni(-)
> 
> diff --git a/block/mirror.c b/block/mirror.c
> index 09ea020..939834d 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -32,6 +32,8 @@ typedef struct MirrorBlockJob {
>      RateLimit limit;
>      BlockDriverState *target;
>      MirrorSyncMode mode;
> +    bool synced;
> +    bool complete;

Maybe rename this to should_complete or completion_requested? For a few
seconds I thought this would indicate that the job has completed.

Kevin

Reply via email to